aboutsummaryrefslogtreecommitdiff
path: root/weed/operation/upload_content.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/operation/upload_content.go')
-rw-r--r--weed/operation/upload_content.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go
index f469b2273..90f90c87d 100644
--- a/weed/operation/upload_content.go
+++ b/weed/operation/upload_content.go
@@ -371,7 +371,7 @@ func (uploader *Uploader) upload_content(ctx context.Context, fillBufferFunction
} else {
reqReader = bytes.NewReader(option.BytesBuffer.Bytes())
}
- req, postErr := http.NewRequest(http.MethodPost, option.UploadUrl, reqReader)
+ req, postErr := http.NewRequestWithContext(ctx, http.MethodPost, option.UploadUrl, reqReader)
if postErr != nil {
glog.V(1).InfofCtx(ctx, "create upload request %s: %v", option.UploadUrl, postErr)
return nil, fmt.Errorf("create upload request %s: %v", option.UploadUrl, postErr)