File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -276,9 +276,11 @@ func (m *MinioStorage) Delete(path string) error {
276276}
277277
278278// URL gets the redirect URL to a file. The presigned link is valid for 5 minutes.
279- func (m * MinioStorage ) URL (path , name string , reqParams url.Values ) (* url.URL , error ) {
280- if reqParams == nil {
281- reqParams = make (url.Values )
279+ func (m * MinioStorage ) URL (path , name string , serveDirectReqParams url.Values ) (* url.URL , error ) {
280+ // copy serveDirectReqParams
281+ reqParams , err := url .ParseQuery (serveDirectReqParams .Encode ())
282+ if err != nil {
283+ return nil , err
282284 }
283285 // TODO it may be good to embed images with 'inline' like ServeData does, but we don't want to have to read the file, do we?
284286 reqParams .Set ("response-content-disposition" , "attachment; filename=\" " + quoteEscaper .Replace (name )+ "\" " )
You can’t perform that action at this time.
0 commit comments