Skip to content
Snippets Groups Projects
Forked from autolab-project / m3 / Tango
Loading
  • Chaskiel Grundman's avatar
    05e4d0f3
    Use tornado streaming for uploads (#154) · 05e4d0f3
    Chaskiel Grundman authored
    * use tornado streaming for uploads
    
    use tornado.web.stream_request_body for the upload handler to avoid
    reading the entire upload into a memory buffer *in the IOLoop*. Instead,
    hash the content as it's streamed in and store it in a temporary file under
    COURSELABS. Then the upload business logic can just rename the temporary file
    over the destination if the upload is accepted. This significantly improves
    latency when large files are uploaded
    
    * Remove tempfile if it's a duplicate
    
    Remove the temporary upload file if it's a duplicate instead of leaving it
    in the temp directory.
    05e4d0f3
    History
    Use tornado streaming for uploads (#154)
    Chaskiel Grundman authored
    * use tornado streaming for uploads
    
    use tornado.web.stream_request_body for the upload handler to avoid
    reading the entire upload into a memory buffer *in the IOLoop*. Instead,
    hash the content as it's streamed in and store it in a temporary file under
    COURSELABS. Then the upload business logic can just rename the temporary file
    over the destination if the upload is accepted. This significantly improves
    latency when large files are uploaded
    
    * Remove tempfile if it's a duplicate
    
    Remove the temporary upload file if it's a duplicate instead of leaving it
    in the temp directory.
Code owners
This project manages its dependencies using pip. Learn more