Search code examples
azureazure-web-app-serviceazure-node-sdk

Node.js running on Azure Website max file upload


I am running an Express website on an Azure Website instance (note I say Azure Website, not Azure Webrole)

Initially, uploading large files failed with an HTTP 500 error. After much research, I found that the solution is to manually adjust the value of the parameter <requestLimits maxAllowedContentLength="xxxxxxx" /> in the web.config file to a higher value. I increased that value to 1Gb and large files started to get uploaded successfully.

However, when I increase the size of that parameter (maxAllowedContentLength) to something much larger (say, 5Gb or 10Gb), the website does not even start up anymore. It looks like there is a hard-coded limit to how large this parameter can be.

Does anyone have links to documentation where the max value of this parameter is specified by Microsoft for an Azure Website, or any pointers on how to get files up to 10Gb to be uploaded?


Solution

  • maxAllowedContentLength is a uint which has a max value of 4,294,967,295 which makes the max limit 4GB - If you want to upload larger amounts of data, you will have to use chunked transfer encoding.