mirror of
https://github.com/eiblog/eiblog.git
synced 2026-03-01 00:34:58 +08:00
fix: qiniu upload file
This commit is contained in:
1 parent
010137ebf5
commit
b7751d7b9e
1 file changed
+2
-1
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -48,7 +49,7 @@ func FileUpload(name string, size int64, data io.Reader) (string, error) {
|
||||
ret := new(storage.PutRet)
|
||||
putExtra := &storage.PutExtra{}
|
||||
|
||||
err := uploader.Put(nil, ret, upToken, key, data, size, putExtra)
|
||||
err := uploader.Put(context.Background(), ret, upToken, key, data, size, putExtra)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user