Skip to content

Instantly share code, notes, and snippets.

@meteormatt
Created July 14, 2017 03:35
Show Gist options
  • Save meteormatt/68401e435cb97382bc85d4de2b110374 to your computer and use it in GitHub Desktop.
Save meteormatt/68401e435cb97382bc85d4de2b110374 to your computer and use it in GitHub Desktop.
const ALY = require('aliyun-sdk');
var oss = new ALY.OSS({
"accessKeyId": '',
"secretAccessKey": '',
"endpoint": 'http://oss-us-west-1.aliyuncs.com',
"apiVersion": "2013-10-15"
});
var redirUrl = oss.getSignedUrl('getObject', {
Bucket: 'meteormatt',
Key: 'Mac图标.jpg',
Expires: 1800,
ResponseContentDisposition: 'attachment; filename="Mac图标.jpg"'
});
console.log(redirUrl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment