Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPTIONS requests #360

Closed
richardwillars opened this issue Sep 22, 2017 · 5 comments
Closed

OPTIONS requests #360

richardwillars opened this issue Sep 22, 2017 · 5 comments

Comments

@richardwillars
Copy link
Contributor

I've just been playing with uploading multiple files and came across an interesting potential issue, just wanted to check if you guys are aware of it, if it's intended functionality and your thoughts.

I added 13 files at the same time. It immediately did OPTIONS requests for all 13 files, then it started uploading the first 6 images. Once it completed one of those images it'd start uploading another one. I understand that functionality is browser behaviour (max parallel connections).

The worrying bit for me is the OPTIONS requests.. if a user added 1000 files in one go then that's 1000 OPTIONS requests that get fired off at the same time! I was expecting the browser to stall each request until there was a connection available, then do the OPTION request for the file and then the actual upload.

screen shot 2017-09-22 at 09 41 29
In the screenshot above the first 13 requests are the OPTIONS requests, then next 13 are the actual uploads.

@goto-bus-stop
Copy link
Contributor

goto-bus-stop commented Sep 22, 2017

Hmm, interesting! guess those are CORS "preflight" requests, it's surprising that they don't wait like the normal requests…

There is a preflight cache but maybe we don't get that because we're sending off all the requests at the same time. The server also needs to respond with an Access-Control-Max-Age header in order to use the cache, if I'm reading it right.

@goto-bus-stop
Copy link
Contributor

One thing that we maybe should be doing anyway is limiting the amount of uploads going on at the same time.

@arturi
Copy link
Contributor

arturi commented Nov 20, 2017

PR #427

@arturi
Copy link
Contributor

arturi commented Nov 28, 2017

Should this be resolved after #427?

@richardwillars
Copy link
Contributor Author

Should indeed! Need to upgrade Uppy on our project which might be next week.. I'll reopen this issue it if it doesn't fix it 👍

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

No branches or pull requests

3 participants