add encoded filename as part of upload url (#3140)
This commit is contained in:
committed by
GitHub
parent
83b060ef94
commit
607d94fef4
@@ -24,7 +24,6 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strconv"
|
||||
@@ -1030,8 +1029,8 @@ func uploadFiles(ctx context.Context, client MinioClient, params objectApi.PostB
|
||||
if contentType == "" {
|
||||
contentType = mimedb.TypeByExtension(filepath.Ext(p.FileName()))
|
||||
}
|
||||
|
||||
_, err = client.putObject(ctx, params.BucketName, path.Join(prefix, path.Clean(p.FileName())), p, size, minio.PutObjectOptions{
|
||||
objectName := prefix // prefix will have complete object path e.g: /test-prefix/test-object.txt
|
||||
_, err = client.putObject(ctx, params.BucketName, objectName, p, size, minio.PutObjectOptions{
|
||||
ContentType: contentType,
|
||||
DisableMultipart: true, // Do not upload as multipart stream for console uploader.
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user