|
@@ -37,12 +37,9 @@ async function uploadPart(file, keyname, uploadid, pn, start, end) {
|
|
|
var params = {
|
|
|
Bucket: bucketname,
|
|
|
Key: keyname,
|
|
|
- ContentType: file.type,
|
|
|
PartNumber: pn,
|
|
|
UploadId: uploadid,
|
|
|
- Body: file.slice(start, end),
|
|
|
- "Access-Control-Allow-Credentials": "*",
|
|
|
- ACL: "public-read",
|
|
|
+ Body: file.slice(start, end)
|
|
|
};
|
|
|
const result = await bucket.uploadPart(params).promise();
|
|
|
return { ETag: result.ETag, PartNumber: pn };
|
|
@@ -54,7 +51,9 @@ async function completeMultipartUpload(parts, keyname) {
|
|
|
Bucket: bucketname,
|
|
|
Key: keyname,
|
|
|
MultipartUpload: { Parts: parts },
|
|
|
- UploadId: uploadid
|
|
|
+ UploadId: uploadid,
|
|
|
+ "Access-Control-Allow-Credentials": "*",
|
|
|
+ ACL: "public-read"
|
|
|
};
|
|
|
return await bucket.completeMultipartUpload(params).promise();
|
|
|
}
|