Skip to content
Snippets Groups Projects
Commit ef532f95 authored by Sebastian's avatar Sebastian
Browse files

added delimiter to get and delete

parent 6cd29fe9
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,7 @@ const AWSBackend = app => {
app.get('/api/aws/:fragmentId/:fileId', authBearer, async (req, res) => {
const params = {
Bucket: process.env.AWS_BUCKET,
Key: `${req.params.fragmentId}${req.params.fileId}`,
Key: `${req.params.fragmentId}/${req.params.fileId}`,
}
s3.getSignedUrl('getObject', params, (err, data) => {
......@@ -75,7 +75,7 @@ const AWSBackend = app => {
app.delete('/api/aws/:fragmentId/:fileId', authBearer, async (req, res) => {
const params = {
Bucket: process.env.AWS_BUCKET,
Key: `${req.params.fragmentId}${req.params.fileId}`,
Key: `${req.params.fragmentId}/${req.params.fileId}`,
}
s3.deleteObject(params, (err, data) => {
if (err) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment