Maximum upload file size on iOS / NSURLRequest / NSURLConnection

I am uploading several gigabyte files from iPhone / iPod and I noticed that NSURLConnection and friends misused signed 32-bit integers for the number of bytes in the download

(all other Apple APIs (long long) aka (int64_t) - allow you to deal with any file that may exist)

When I try to download files larger than 3 GB streaming from a file, I get data overflow returning from Apple, but this may be a problem with something in the chain (web proxy, cache, server). I'm still debugging this, but in the meantime ....

Apple's docs don't mention the download size limit - is there one?

In Bizarrely, I have no problem downloading up to 3 GB (although the overflow should be 2 GB) - it will go to 3 GB, which always overflows. (I triple-checked my whole source that I am not using 32-bit types anywhere, so I'm pretty sure this is a problem somewhere between iOS and the server)

+4
source share

Source: https://habr.com/ru/post/1490673/


All Articles