use final destination to resolve fs configuration

related to https://github.com/chrislusf/seaweedfs/issues/3075
This commit is contained in:
chrislu
2022-05-30 22:47:26 -07:00
parent 8902fa6ff6
commit 596c3860ca
6 changed files with 23 additions and 8 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"github.com/chrislusf/seaweedfs/weed/s3api/s3_constants"
"net/http"
"os"
"strings"
@@ -58,8 +59,13 @@ func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request, conte
ctx := context.Background()
destination := r.RequestURI
if finalDestination := r.Header.Get(s3_constants.SeaweedStorageDestinationHeader); finalDestination != "" {
destination = finalDestination
}
query := r.URL.Query()
so, err := fs.detectStorageOption0(r.RequestURI,
so, err := fs.detectStorageOption0(destination,
query.Get("collection"),
query.Get("replication"),
query.Get("ttl"),