Fix early context cancellation when downloading/previewing object (#1846)
* Fix early context cancellation when downloading/previewing object Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
@@ -367,8 +367,8 @@ func parseRange(s string, size int64) ([]httpRange, error) {
|
||||
}
|
||||
|
||||
func getDownloadObjectResponse(session *models.Principal, params user_api.DownloadObjectParams) (middleware.Responder, *models.Error) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
ctx := context.Background()
|
||||
|
||||
var prefix string
|
||||
mClient, err := newMinioClient(session)
|
||||
if err != nil {
|
||||
@@ -468,8 +468,8 @@ func getDownloadObjectResponse(session *models.Principal, params user_api.Downlo
|
||||
}), nil
|
||||
}
|
||||
func getDownloadFolderResponse(session *models.Principal, params user_api.DownloadObjectParams) (middleware.Responder, *models.Error) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
ctx := context.Background()
|
||||
|
||||
var prefix string
|
||||
mClient, err := newMinioClient(session)
|
||||
if params.Prefix != "" {
|
||||
|
||||
Reference in New Issue
Block a user