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

file upload improvements #5062

Merged
merged 1 commit into from
Feb 5, 2025
Merged

file upload improvements #5062

merged 1 commit into from
Feb 5, 2025

Conversation

sbwalker
Copy link
Member

@sbwalker sbwalker commented Feb 5, 2025

  • uses Fetch API rather than XHR
  • Passes file part identifiers to server using headers rather than as part of the file name (to better hide implementation details from client)
  • uses asynchronous approach rather than synchronous
  • uses Promises to manage the entire process and return whether or not the upload process succeeded or failed
  • since the status of the entire upload process is available on the client, there is no need for polling anymore (eliminating one of the most problematic aspects of the upload process)
  • Promises also prevent the server from being flooded with requests
  • chunk size is configurable (however increasing its value from the default of 1 MB can result in timeouts in low latency environments)
  • saves memory by not creating an array containing all of the file chunks

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.

1 participant