How can I safely handle file uploads with Active Storage?

If users upload files or images to my Ruby on Rails app, how can I make sure those files are uploaded and stored safely?

For fault tolerance, set up ActiveStorage mirroring. (That article describes how to add an additional service once you have one set up — and in your case to have good assurance not to lose uploaded content then just maintain one or more mirrors on differing services.)

1 Like

37signals’ HotCell GitHub - basecamp/hotcell: ☢️HotCell☢️ is an unprivileged sidecar container for handling untrusted inputs, purpose-built for Rails applications. · GitHub is under development.

Thanks for sharing article.

2 Likes

ActiveStorage mirroring seems like a practical approach for improving fault tolerance and reducing the risk of losing uploaded files. Using different storage providers for the mirrors also makes sense because it avoids depending entirely on a single service. I’ll look into this approach for maintaining backups of uploaded content.

1 Like