berwin/aliyun-oss-upload-stream

设置阿里云请求头

jiangtao opened this issue · 4 comments

使用stream的时候 用ajax formdata上传,请求头转成默认的下载请求头。

我研究下哈 回头给你发pr @berwin 你不忙的话可以搞搞。

可以在这里设置一些header信息~ 包括 content-type Expires ACL 等。。

var upload = ossStream.upload({
  Bucket: 'Bucket',
  Key: 'Key (可以理解为文件名)',
  ContentType: 'image/png',
  ContentDisposition: '',
  // CacheControl: '',
  // ContentEncoding: '',
  // Expires: '',
  // ServerSideEncryption: '',
  // ACL: 'public-read'
});

刚看到,跟最早之前其实是一个问题。。 #2