set cache control on uploads

This commit is contained in:
keyan 2022-05-18 11:59:59 -05:00
parent 01e7c7003b
commit f7d3f281b8
2 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,7 @@ export default {
Expires: 300,
Conditions: [
{ 'Content-Type': type },
{ 'Cache-Control': 'max-age=31536000' },
{ acl: 'public-read' },
['content-length-range', size, size]
]

View File

@ -38,6 +38,7 @@ export default function Upload ({ as: Component, onSelect, onStarted, onError, o
Object.keys(data.getSignedPOST.fields).forEach(key =>
form.append(key, data.getSignedPOST.fields[key]))
form.append('Content-Type', file.type)
form.append('Cache-Control', 'max-age=31536000')
form.append('acl', 'public-read')
form.append('file', file)