const AWS = require('aws-sdk');
const s3 = new AWS.S3();
const getSignedUrl = async (req, res) => {
const { key, contentType } = req.body;
const params = {
Bucket: 'followwork',
Key: key,
ContentType: contentType,
Expires: 60, // URL valid for 60s
};
const url = await s3.getSignedUrlPromise('putObject', params);
res.json({ uploadUrl: url });
};
Sign up here with your email
ConversionConversion EmoticonEmoticon