Uppy: Disable timeout for browsers without `uploadProgress` capability

Created on 7 Dec 2018  路  9Comments  路  Source: transloadit/uppy

As noted by the OP in #945 EdgeHTML versions 15.15063 to 18.18218 fail any upload that takes more than 30 seconds.

Could we use the new capabilities.uploadProgress from #1184 to disable timeout for these clients?

Another strategy could be to polyfill the missing Edge behavior (periodically check bytes-uploaded field from XHR instance and manually trigger change event) but that might be a bit too intrusive.

All 9 comments

oops yes that should definitely be done!

XHR instances don't have a way to get the current progress i think. the bytesUploaded stuff in uppy is set in the progress event, afaik that's the only place that has it.

Good to hear! I wrote a couple lines but couldn't test yet. I let you know when I do or if you have a suggestion for a better place or way to do this, I'd appreciate it.

Here's the link: https://github.com/davilima6/uppy/commit/eb36b978abb141c308ef6c6d6f864b8de484dda9

@goto-bus-stop, I was thinking of parsing responseText like in updateProgress() here: https://www.webdavsystem.com/javaserver/doc/resumable_upload/multipart_post/

For an explanation: https://stackoverflow.com/a/77163/462849

The REPORT method stuff mentioned in the first link seems to require server side support. if querying responseText.length works well that would be great!

I'll try and let you know. Thanks!

Thinking about it responseText.length won't work because that's the response size, not the upload size :sweat_smile:

True, my bad. Let's leave the shimming option aside, or properly adopt a library that does it. Besides we might not even need to use the capability if we delay the timeout being set as proposed in #1190.

Thank you, @arturi!

Thank you! :)

Was this page helpful?
0 / 5 - 0 ratings