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

feat: Send uploaded file size via querystring #311

Merged
merged 2 commits into from
Feb 25, 2021

Conversation

taratatach
Copy link
Member

Some fetch implementations like the one used in the Cozy Desktop
client (i.e. using Chromium's network stack) don't allow setting the
Content-Length header when sending stream bodies.
With this limitation, the remote cozy-stack cannot run size checks
until the whole file has been uploaded. If the file is large and too
large for the available space or the file size limit, the uploading
client can spend quite some time uploading it to end up receiving an
error response.

cozy-stack now allows passing the file size via the querystring
parameter Size so those clients will get the benefits of early size
checks.

  Some `fetch` implementations like the one used in the Cozy Desktop
  client (i.e. using Chromium's network stack) don't allow setting the
  `Content-Length` header when sending stream bodies.
  With this limitation, the remote `cozy-stack` cannot run size checks
  until the whole file has been uploaded. If the file is large and too
  large for the available space or the file size limit, the uploading
  client can spend quite some time uploading it to end up receiving an
  error response.

  `cozy-stack` now allows passing the file size via the querystring
  parameter `Size` so those clients will get the benefits of early size
  checks.
@taratatach taratatach self-assigned this Feb 24, 2021
@taratatach taratatach merged commit 5463175 into master Feb 25, 2021
@taratatach taratatach deleted the feat/send-file-size-via-querystring branch February 25, 2021 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants