BCcampus / pressbooks-openstax-import

[UNMAINTAINED] Pressbooks Plugin for OpenStax Textbook Import
GNU General Public License v3.0
5 stars 0 forks source link

Research Chunking large files over HTTP protocol #53

Closed bdolor closed 6 years ago

bdolor commented 6 years ago

transferring large files over http requires a lot of server resources. Will look at chunking in order to get around this limitation.

bdolor commented 6 years ago

long story short, at minimum, would require cnx to set transfer-encoding to chunked:

from https://gist.github.com/CMCDragonkai/6bfade6431e9ffb7fe88

Chunking is a 2 way street. The HTTP protocol allows the client to chunk HTTP requests. This allows the client to stream the HTTP request. Which is useful for uploading large files. However not many servers (except NGINX) support this feature, and most streaming upload implementations rely on Javascript libraries to cut up a binary file and send it by chunks to the server. Using Javascript gives you more control over the uploading experience, but the HTTP protocol would be the most simplest.