Skip to content

Conversation

@blattms
Copy link

@blattms blattms commented Apr 20, 2023

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 added 2 commits April 19, 2023 09:59
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant