Fix possible crash with Synology if the uploaded amount is larger than a 32-bit int will hold (~2GB).