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

Fix timeout problem on client for large chunked uploads. #92

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Apr 19, 2023

  1. Fix timeout problem on client for large chunked uploads.

    Putting those chunks together and moving the file to temporary
    storage might take quite some time. Hence the response to the upload
    of the last chunk might take longer than the timeout on the client.
    
    In that case the client will retry uploading the last chunk and this
    would fail on the server with the following log message, because the
    upload is already complete (offset is the size of the uploaded file:
    ```
    ERROR django_drf_filepond: uploaders Offset provided by client <22807552000> doesn't match the stored offset <22808122462> for chunked upload id ...
    ```
    
    This change will do two things for the reupload attempts of the client:
    1. If the upload is already complete but the chunks are not yet put
       together then it will sleep a while and return HTTP error code 408
    2. If the upload was already put together successfully, then it will
       return success.
    blattms committed Apr 19, 2023
    Configuration menu
    Copy the full SHA
    e06fd26 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d1febe8 View commit details
    Browse the repository at this point in the history