Skip to content

Commit 8d35139

Browse files
wangxiaoleeyeh
authored andcommitted
fix upload file by s3 (#314)
* fix change log again * fix upload file by s3
1 parent 87458aa commit 8d35139

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 1.1.0 日期:2016 年 6 月 27 日
22
* 防止 SDK 覆盖全局变量 AV
33
* Object.add、Object.addUnique、Object.remove 等方法支持从传入非数组类型的 value 参数
4-
* 修复路由缓存错误,不再出现多次 410 错误请求
4+
* 修复路由缓存异常时,不再出现多次 410 错误请求
55
* 美国节点上传到 S3 改为直接上传,不再通过服务器中转
66

77
# 1.0.0 日期:2016 年 5 月 30 日

src/uploader/s3.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
const request = require('superagent');
77
const AVPromise = require('../promise');
88

9-
module.exports = function upload(uploadUrl, data, file, saveOptions = {}) {
9+
module.exports = function upload(uploadInfo, data, file, saveOptions = {}) {
1010
// 海外节点,针对 S3 才会返回 upload_url
1111
file.attributes.url = uploadInfo.url;
1212
const promise = new AVPromise();
13-
const req = request('PUT', uploadUrl)
13+
const req = request('PUT', uploadInfo.upload_url)
1414
.set('Content-Type', file.attributes.metaData.mime_type)
1515
.send(data)
1616
.end((err, res) => {

0 commit comments

Comments
 (0)