Use background workers to process uploads to free up your app. Many aspects of the world, items, and player settings can be changed in this way. The latter option is only recommended for advanced users. Depending on your chosen language and framework, this method can cause latency issues for other requests while the upload takes place. Server Configuration can be done either through the server GUI or by directly editing configuration files. This method enables you to perform preprocessing on user uploads before you push them to S3. In a pass-through upload, a file uploads to your app, which in turn uploads it to S3. It also limits the ability to modify files before storing them in S3. Although this method reduces the amount of processing your application needs to perform, it can be more complex to implement.
In a direct upload, a file uploads to your S3 bucket from a user’s browser, without first passing through your app. See the language guides for specific instructions. There are two approaches to processing and storing file uploads from a Heroku app to S3: direct and pass-through. You can manually add static assets such as videos, PDFs, Javascript, CSS, and image files using the command line or the Amazon S3 console. Store the bucket name in a config var to give your application access to its value: $ heroku config:set S3_BUCKET_NAME=example-app-assetsĪdding config vars and restarting app. To create a bucket, access the S3 section of the AWS Management Console and create a new bucket in the US Standard region:įollow AWS’ bucket naming rules to ensure maximum interoperability.
Create your S3 bucket in the same region as your Heroku app to take advantage of AWS’s free in-region data transfer rates.