Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

XHR timeout disabled is required for file uploads. #3399

Merged
merged 1 commit into from
Jun 1, 2015

Conversation

Herst
Copy link
Contributor

@Herst Herst commented Jun 1, 2015

A timeout (e.g. set globally to work around certain Google Chrome bugs) would otherwise break file uploads lasting longer than the set value.

A timeout (e.g. set globally to work around certain Google Chrome bugs) would otherwise break file uploads lasting longer than the set value.
@blueimp
Copy link
Owner

blueimp commented Jun 1, 2015

Thanks for your contribution.
However if a timeout is set globally, this usually means there is a reason why requests should time out after the set time. And if file uploads are to be handled differently, I think it's better to explicitly set this in the fileupload initialization, than to set it globally, which might lead to surprises.

@blueimp blueimp closed this Jun 1, 2015
@Herst
Copy link
Contributor Author

Herst commented Jun 1, 2015

Well, normally someone might set the timeout and just have the response time in mind but for timeout the request time counts as well, in this case the length of the whole upload. In my case it was unexpected and I see no reason why anyone would ever want to have a timeout on an upload request.

there is a reason why requests should time out after the set time

Yes, like I wrote in the commit description there are certain Chrome bugs:
http://stackoverflow.com/q/21063909

@blueimp blueimp reopened this Jun 1, 2015
@blueimp
Copy link
Owner

blueimp commented Jun 1, 2015

That is a valid argument. I've reconsidered and the surprise of not following the global timeout setting is a lesser concern, so I'll merge it. Thanks for your patience!

blueimp added a commit that referenced this pull request Jun 1, 2015
XHR timeout disabled is required for file uploads.
@blueimp blueimp merged commit 0b6c3b7 into blueimp:master Jun 1, 2015
@Herst
Copy link
Contributor Author

Herst commented Jun 1, 2015

Great, thank you. Also worth mentioning in the wiki (which I can't edit in this repo BTW).

@blueimp
Copy link
Owner

blueimp commented Jun 1, 2015

Done. Wiki editing is disabled as it was too much of a hassle to revert spam changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants