Thoughts, information and reflections about technology

Active Storage in Rails 5.2 DOES NOT SUPPORT VALIDATIONS

You have to be kidding me.. I just found out that Active Storage in Rails DOES NOT SUPPORT VALIDATIONS.

Active Storage is new to Rails 5.2. It is designed to replace tools such as CarrierWave and Paperclip that allow users to upload attachments

BUT it does not support validations.

In other words, there is no built in means of limiting file size or file extension/type.  If you want to validate the data, you need to build your own solution. If you don’t users can upload huge files or possibly malicious files.

This issue in the Rails Repo has been locked.  It is a discussion of this shortcoming of Active Storage.

https://github.com/rails/rails/issues/31656

 

 

 

 

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact me
Archives
Categories
Amazon Disclosure

We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.