Media Upload: Segments do not add up to provided total file size



I’ve been trying to build a little script taking advantage of the media/upload endpoint, and have been testing uploading mp4s, pngs, and gifs.

I use the chunked uploading style, and haven’t had any issues - until today. Without any logic changing, and using the same test files, today I’ve been encountering the error: Segments do not add up to provided total file size. about 50% of the time I upload.

I can encounter this error, then reupload the exact same file, and it will work. Again, this only started happening today. What could the issue be?


That’s unusual! I’m not aware of any changes on our media backend, and I won’t be able to look into this until next week.

The only suggestion I have at the moment is to try our large media file upload sample app and see if that encounters the same issue.


No worries, thanks for the quick response on a Saturday :sweat_smile:

I’ll give it a try - I’ve been testing with videos, images, and gifs from 40Kb - 100Mb, and they all work, just not 100% of the time… Will keep trying to get to the bottom of it. Just wasn’t sure if there was something that had changed on your end.


@andypiper I continue to see this error, and continue to be baffled. I’m wondering if it is because some of the file’s chunks are getting lost as I upload it.

Again, my functionality hasn’t changed, and I would say with the same files this will happen ~50% of the time, which is frustrating. Any suggestions, or insights?