Customize file upload size on Heroku?

You have a Rails app on Heroku. I want to limit the file upload size, if possible. The file is processed as a StringIO object, so the contents of the file will be processed in memory (no need to write an intermediate file to the file system).

Usually I limited the upload size on the web server. But with Geroku, what options are there? I understand that I can go with the Flash loader, but I hope to avoid the need to use Flash on the client, if at all possible.

+2
source share
2 answers

Heroku limits the request object to a small size (30 MB), and also limits all request / response cycles to 30 seconds. Both are hard and fast rules.

Rails Tempfile .

+1

NGINX .

heroku, nginx.conf buildpack.

# nginx.conf
http {
    #...
    client_max_body_size 100m;
    #...
}

. , heroku NGINX (.. ).

https://blog.codeship.com/how-to-deploy-nginx-on-heroku

, !

0

All Articles