I’ve just reduced the size of the MP3s on my app to half, by reducing the bitrate. So the folder size has gone from 80mb, to 40mb
However, when I go to upload the app - I’m getting the “Request failed with status code 413” message. As in, one of the MP3s is too large to upload. If I add the old larger MP3s back into the folder, it works fine - saying “assets already uploaded”.
Is this a recent change? As in the last few months or so? Seems weird that I’ve reduced the size of the Mp3s and now I can’t upload them.
I’ve updated the CLI to the latest, I am now getting better messaging:
The request body is too large. The file you are uploading is 30.0 MB, which exceeds the 30 MB limit.
The odd thing is, no file is larger than 10MB - most are 1mb or 2mb. Does this mean that the assets overall can’t be larger than 30MB? Seems strange as only last week I managed to upload the files at a higher bitrate - total folder size of assets was 80mb.
For anyone coming here later - I found a way around this…at least it appears to have built successfully.
I removed half the MP3 files and all imports for them in the JS modules - enough to bring the overall assets folder to below 30mb.
I then created a build and ran it to completion. After that, I added the files I’d deleted back into the build and the imports into the JS files - as half the files had already been uploaded, the build script only detected the new files, which totalled below 30mb, and then only uploaded the new ones.
Hi @notbrent - tried with the legacy setting, it didn’t throw any errors, but it skipped uploading the assets again, as they were already there. Let me know if you need me to try something different.
Uploading assets
No assets changed, skipped.
@jkhales - the original assets folder in total, was 80MB. Which used to work.
After I’d optimised all the MP3s, the total folder size was 40MB, but because they were new files, it was re-uploading them and that’s where the 30MB error was coming up.
OK yea, we had imposed a new 30mb upload limit recently to help keep our costs under control and servers stable. We are going to do a better job about publicizing that. In the mean time we’ve increased the limit to 50mb and should be deploying that by end of day.
After reading about your problem, I was wondering why the need to include the full mp3 object folder in your build!!! I know one quick answer would be for better performance. Nonetheless, you could still get an appreciable (or even better) performance by storing the actual mp3 objects in a cloud location, the keys in a database and fetching them in your app as at when needed.