Upload file with carrierwave without name <p>It's me again. I try to upload some yaml files with carrierwave. Everything works fine till now. </p> <p>So, as you know for carrierwave the forms looks like the follow:</p> <pre><code>&lt;%= form_for @resume, html: { multipart: true } do |f| %&gt; &lt;%= f.label :name %&gt;&lt;br&gt; &lt;%= f.text_field :name, :required =&gt; true %&gt; &lt;%= f.label :attachment %&gt;&lt;br&gt; &lt;%= f.file_field :attachment, :required =&gt; true %&gt; &lt;br&gt;&lt;br&gt; &lt;%= f.submit "Save", class: "btn btn-primary" %&gt; &lt;% end %&gt; </code></pre> <p>What i want to do now is to remove the "name" field. I don't need it. So i thought its quite easy, just remove the "name" part of the form. But then I got an error while upload:</p> <pre><code>Name can't be blank </code></pre> <p>So I tried now nearly everything... I had set the <code>required =&gt; false</code> same result. I went to Github and tooked a look at their how-to... there are methods to overwrite the name, but nobody cares about upload a file without a name. May somebody can tell me how i can upload a file without this name field?</p> <p>Thanks!</p> <p>Edit:</p> <p>My resume.rb model:</p> <pre><code>class Resume &lt; ActiveRecord::Base mount_uploader :attachment, AttachmentUploader # Tells rails to use this uploader for this model. end </code></pre> <p>My AttachmentUploader:</p> <pre><code>class AttachmentUploader &lt; CarrierWave::Uploader::Base storage :file def store_dir "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end def extension_white_list %w(yml) end def filename "something.jpg" if original_filename # This is the part where i'm trying around right now. end end </code></pre>