Cloudflare doesn't resume upload

We are currently integrating TUS into our application. So far upload works without problems but it is not able to resume uploads. I start the upload, refresh the page and select the same file. I enabled logging for tus-js client and it tries to resume but the server always responds with Upload-Offset: 0 which results in starting the upload from 0%.

The following requests are sent in the browser to cloudflare:

  1. When file is first time uploaded:
Start upload
Calculated fingerprint: f395ec55836f20bebf1c90db00ef8c3234855a6ccf0731befe27da53a9c00ccf
Creating a new upload
Created upload at
0 217448448 '0.00%'
327500 217448448 '0.15%'
1506500 217448448 '0.69%'
2685500 217448448 '1.24%'

Request sent:

POST http://localhost:4200/upload

In the middle of the upload, I press refresh.
2. Reselect the same file and start upload:

Start upload
Calculated fingerprint: f395ec55836f20bebf1c90db00ef8c3234855a6ccf0731befe27da53a9c00ccf
Resuming upload from previous URL:
0 217448448 '0.00%'
360250 217448448 '0.17%'
1473750 217448448 '0.68%'
Tus-Resumable: 1.0.0
Upload-Length: 217448448
Upload-Offset: 0

The file starts to be uploaded from 0% again.

It looks like the cloudflare server doesn’t respond with the correct Upload-Offset. When I try the test endpoint, everything works fine. Somebody an idea?

Probably Cloudflare’s infrastructure is highly distributed and there is no shared storage for incomplete uploads? Maybe upload attempt 1 lands on a different server than upload attempt 2 and the 2nd server doesn’t have the incomplete upload from attempt 1?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.