Request failed with status code 413

I want to upload a 34 Mb sqlite database as an asset. The user will be asked if he want to download the asset, and the user can see a downloading progress bar. The asset is thus not bundled within the app.

When I want to publish, I’m having an issue. “Request failed with status code 413”.

What is the maximum file size ? Is there a solution ?

I’m using exp v33. 0 and expo-cli v3.0.9

Hey @smontlouis,

Yeah, the asset is too large to be uploaded via publishing. Additionally, there is no way to set up the behavior your describing with the Updates module. It’s an all-or-nothing deal so the user will download the entire newly published JS bundle and any assets accompanying it. I’d suggest uploading it to a different hosting platform and then prompting the user to download it via FileSystem.downloadAsync (https://docs.expo.io/versions/v34.0.0/sdk/filesystem/#filesystemdownloadasyncuri-fileuri-options)

Cheers,
Adam

Thank @adamjnav. Makes sense !

But what’s the point of having the “assetBundlePatterns” in the app.json, if any assets will be shipped with the newly published JS ?

The way assets are handled is focused more so on performance and reliability than on bundle size. If you bundle your assets, your app will look to the local disk rather than making a network request to the CDN to fetch the asset.

Thank you very much !

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.