You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Googling various resources, I finally got working multiple file upload to S3 presigned URLs (using Vue)
This involves:
custom accept handler, which gets S3 presigned URL for each file and sets it as a file property, eg file.uploadUrl
manual processing: autoProcessQueue: false
on('processing', ) handler
letonDropzoneProcessing=(file)=>{cl('onDropzoneProcessing',file.uploadUrl)// change url before sending//this.options.url = file.uploadUrl this doesn't work, must use global variable as belowmyDropzone.options.url=file.uploadUrl//so only 1 at a time?}
sending: function(file,xhr){let_send=xhr.send//console.log('sending', file.name, file.uploadUrl)//this.options.url = file.uploadUrl no effect, still uploading to #xhr.send=function(){_send.call(xhr,file)}},
Ideally, this should all that be needed. But it seems url is the same for all files, so it doesn't work with multiple uploads.
It also needs to support async, like accept does, by having a callback parameter.
Next ideal solution would be just step 1 above.
Then, if a file has a special property set, eg uploadUrl, have dropzone use that to upload the file to. That's it.
It does seem simple to implement and would save a lot of headaches for new users with this use case.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hi,
Googling various resources, I finally got working multiple file upload to S3 presigned URLs (using Vue)
This involves:
custom
accepthandler, which gets S3 presigned URL for each file and sets it as a file property, egfile.uploadUrlmanual processing:
autoProcessQueue: falseon('processing', )handlersending(can't tell why, multiple answers says it's required)Docs https://docs.dropzone.dev/configuration/basics/configuration-options
mention for
urlthatYou can also provide a function that will be called with files and must return the urlIdeally, this should all that be needed. But it seems
urlis the same for all files, so it doesn't work with multiple uploads.It also needs to support async, like
acceptdoes, by having a callback parameter.Next ideal solution would be just step 1 above.
Then, if a file has a special property set, eg
uploadUrl, have dropzone use that to upload the file to. That's it.It does seem simple to implement and would save a lot of headaches for new users with this use case.
What do you think?
All reactions