Uploading files using multipart / form-data is straightforward and takes a very long time until you start focusing on uploading large files. If we carefully consider what happens during file upload:
the client sends a POST request with the contents of the file to BODY
the web server accepts the request and initiates data transfer (or returns error 413 if the file size exceeds the limit)
webserver begins to fill buffers (depending on the size of files and buffers), store it on disk and send it through a socket / network to the server
back-end authenticates (see as soon as the file is uploaded)
the back-end reads the file and cuts several headers Content-Disposition, Content-Type, saves it again on disk back-end does everything you need to do with the file
To avoid such overhead, we upload the file to disk (Nginx client_body_in_file_only) and manage the callback for further sending along the line. Then the queue worker selects the file and does everything necessary. It works for interservice communication quite smoothly, but we must solve a similar problem with client-side downloads.
We also have a client solution for downloading S3. No interaction occurs. To download the video, we manage the video to convert to h.264 Baseline / AAC format with Zencoder.
We are currently using a modified s3-swf-upload-plugin- based Flash downloader with the Zencoder JS SDK combination, which is really effective but uses Flash.
Question. How to achieve the same goal with HTML5 file loader? Filepicker.io and Zencoder solve the problem? What is the recommended way to control the loading of an HTML5 file without using external interaction?
The requirements are as follows:
- HTML5, not flash
- to download the video, followed by processing, to make it compatible with HTML5 players and a mobile phone.
- for loading images with subsequent processing (resizing, cropping, rotation)
- for downloading documents such as PDF with preview function
Does https://www.filepicker.com comply
Anatoly
source share