Include extension in S3 key (#1426)
This commit is contained in:
parent
18fbd17025
commit
b82641d1bd
@ -49,7 +49,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const upload = await models.upload.create({ data: { ...fileParams } })
|
const upload = await models.upload.create({ data: { ...fileParams } })
|
||||||
return createPresignedPost({ key: String(upload.id), type, size })
|
|
||||||
|
const extension = type.split('/')[1]
|
||||||
|
const key = `${upload.id}.${extension}`
|
||||||
|
return createPresignedPost({ key, type, size })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user