Search code examples
ruby-on-railsrails-activestorage

Adding files with Active Storage deleted the previous files


I am trying to add file uploads to my Rails 6 app and Active Storage. I followed this guide (https://gorails.com/episodes/direct-uploads-with-rails-active-storage)

It works perfect except that when you update the parent record and add additional flies all the previous ones are purged. Do you need to customize your controller or am I missing some simple configuration option here?


Solution

  • This is a known issue in Rails 6.0.0rc1

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

    I think they'll fix this via a config variable if I understood well.