'Bucketeer persigned links?
I currently use AWS s3's createPresignedPost service to get a url from my server that I can then upload files to directly to from my web app (rather than sending the file to my server).
I am currently looking at moving to Heroku and wondering if Bucketeer will offer me the same options?
const params = {
Bucket: `${config.clusterName}-${config.projectName}-s3`,
Expires: 3600,
Fields: { key: `uploads/${filename}` },
Conditions: [
['content-length-range', 0, 10000000], // 10 Mb
],
}
console.log("calling createPresignedPost")
S3.createPresignedPost(params, (e, data) => {
if (e) return reject(e)
ret = {
hostedUrl,
url: data.url,
fields: {
key: data.fields.key,
bucket: data.fields.bucket,
algorithm: data.fields['X-Amz-Algorithm'],
credential: data.fields['X-Amz-Credential'],
date: data.fields['X-Amz-Date'],
policy: data.fields.Policy,
signature: data.fields['X-Amz-Signature'],
},
}
resolve(ret)
})
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
