Skip to content

Commit 70367e3

Browse files
wangxiaoleeyeh
authored andcommitted
fix fileObject do not have objectId. (#320)
1 parent b86b0c1 commit 70367e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/uploader/s3.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ const request = require('superagent');
77
const AVPromise = require('../promise');
88

99
module.exports = function upload(uploadInfo, data, file, saveOptions = {}) {
10-
// 海外节点,针对 S3 才会返回 upload_url
1110
file.attributes.url = uploadInfo.url;
11+
file._bucket = uploadInfo.bucket;
12+
file.id = uploadInfo.objectId;
1213
const promise = new AVPromise();
14+
// 海外节点,针对 S3 才会返回 upload_url
1315
const req = request('PUT', uploadInfo.upload_url)
1416
.set('Content-Type', file.attributes.metaData.mime_type)
1517
.send(data)

0 commit comments

Comments
 (0)