aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hooks/useS3Preupload.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hooks/useS3Preupload.tsx b/src/hooks/useS3Preupload.tsx
index 3545cd5..1fb2cd6 100644
--- a/src/hooks/useS3Preupload.tsx
+++ b/src/hooks/useS3Preupload.tsx
@@ -45,7 +45,9 @@ export default (): Hook => {
};
setProgress(0.01);
- return get('/files')
+ // Add querystring to avoid caching request in some browsers, see
+ // https://stackoverflow.com/questions/59339561/safari-skipping-xmlhttprequests
+ return get(`/files?key=${file.name}`)
.then(response => response.data)
.then(uploadUrl => axios.put(uploadUrl, file, config))
.then(response => {