muxinc / upchunk

Uploads Chunks! Takes big files, splits them up, then uploads each one with care (and PUT requests).
MIT License
329 stars 46 forks source link

[Bug] Failure to Handle 'Range' Response Header in Chunked Uploads to GCS #124

Closed skidder closed 6 months ago

skidder commented 6 months ago

Hello Mux Team! 👋

I've encountered an issue with upchunk's handling of resumable chunked uploads to Google Cloud Storage (GCS). Specifically, the library does not appear to process the Range header in HTTP 308 responses correctly, potentially leading to incomplete uploads despite successful transmission of all data chunks.

Current Behavior:

Expected Behavior:

Suggested Fix:

I believe that fixing these issues should improve the reliability of chunked uploads to GCS, or any other service that makes use of the response Range header. I'm happy to submit a PR or collab on a solution!

Thanks!

cjpillsbury commented 6 months ago

👋 Hey @skidder! Taking a peep at the PR ASAP, but broadly this ask makes sense to me.

cjpillsbury commented 6 months ago

@skidder you should be good to go! https://www.npmjs.com/package/@mux/upchunk/v/3.3.1 We can re-open/create a new issue if there are any problems.