Note that there are some explanatory texts on larger screens.

plurals
  1. POnginx resumable upload with upload_module and multipart/form
    primarykey
    data
    text
    <p>I currently upload to a webservice on an nginx server using the upload module (<a href="http://www.grid.net.ru/nginx/upload.en.html" rel="nofollow">http://www.grid.net.ru/nginx/upload.en.html</a>) from a custom desktop application doing a simple multipart-form POST that sends a file in one part and a base64 encoded XML with the file's metadata in another part. </p> <p>The server receives this POST, passes it to my webservice which reads the metadata, processes the file and all is good.</p> <p>What I want to do now is use the upload module's upload_resumable directive to do the POST in several chunks to minimize disconnection chances and allow resume. I can currently do this following the protocol described here: <a href="http://www.grid.net.ru/nginx/resumable_uploads.en.html" rel="nofollow">http://www.grid.net.ru/nginx/resumable_uploads.en.html</a></p> <p>One sends byte ranges of the file along with some headers to identify the chunk and the session in several posts and once all the parts have been uploaded, nginx will compose the final POST containing the file name and path and pass it to your upload_pass location (which in my case CGIs to a django app).</p> <p>However, I am not clear on how one would send a multipart post with this method since the protocol indicates that the body of the POST must be the bytes indicated in the byte range. I need the final post to also contain the XML I wrote about above. </p> <p>I can think of sending the XML as the first bytes of the body and a header that indicates how many bytes belong to it but that would mean extra handling of the final file to remove that header and the final files are potentially in the GB size range.</p> <p>Any other ideas?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload