diff options
-rw-r--r-- | app/helpers/active_storage/file_field_with_direct_upload_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/active_storage/file_field_with_direct_upload_helper.rb b/app/helpers/active_storage/file_field_with_direct_upload_helper.rb index 87af79cdfd..7c5fd0eb55 100644 --- a/app/helpers/active_storage/file_field_with_direct_upload_helper.rb +++ b/app/helpers/active_storage/file_field_with_direct_upload_helper.rb @@ -12,7 +12,7 @@ module ActiveStorage private def convert_direct_upload_option_to_url(options) - options.merge('data-direct-upload-url': rails_direct_uploads_url) if options.delete(:direct_upload) + options.merge('data-direct-upload-url': options.delete(:direct_upload) ? rails_direct_uploads_url : nil).compact end end end |