Hi,
You can increase the file size.
int size = 20971520;
file.OpenReadStream(20971520);
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Is there any limit to sending(Like InputStream Data) HTTP Trigger Response in Azure Function?
Hi,
You can increase the file size.
int size = 20971520;
file.OpenReadStream(20971520);
@Jeet Jangir To summarize, we do have Http Request Limit of 100MB as mentioned in docs: Limits. However, for Http Response, the limit depends on how you process the file. If you try to download a very large file into memory, then JVM heap would run into out of memory and will fail.
With InputStream approach, you should be able to process large file like 800MB, but it will also fail if you try to convert all stream content to an object (which loads into memory). So basically, it depends on what you are doing with InputStream.
From the snippet, you are returning stream in the response body, but additional details like where you are downloading this stream, use case, full snippet etc. would really help. We can try to come up with some code samples or suggest alternatives such as blob output trigger (where they can pass their file to a blob storage) for your scenario.
I hope this helps and feel free to add a comment for any questions. Would be happy to answer any.