🐛 Try to optimize the uploading
This commit is contained in:
parent
347b1bad77
commit
2d4034d7f8
@ -100,9 +100,12 @@ func ReUploadFile(meta models.Attachment, dst int, doNotUpdate ...bool) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_, err = client.FPutObject(context.Background(), destConfigured.Bucket, filepath.Join(destConfigured.Path, meta.Uuid), inDst, minio.PutObjectOptions{
|
_, err = client.FPutObject(context.Background(), destConfigured.Bucket, filepath.Join(destConfigured.Path, meta.Uuid), inDst, minio.PutObjectOptions{
|
||||||
ContentType: meta.MimeType,
|
ContentType: meta.MimeType,
|
||||||
SendContentMd5: false,
|
SendContentMd5: false,
|
||||||
DisableContentSha256: true,
|
DisableContentSha256: true,
|
||||||
|
PartSize: 10 * 1024 * 1024,
|
||||||
|
ConcurrentStreamParts: true,
|
||||||
|
NumThreads: 4,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("unable to upload file to s3: %v", err)
|
return fmt.Errorf("unable to upload file to s3: %v", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user