-
-
Save meteormatt/68401e435cb97382bc85d4de2b110374 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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