.uploads .asset-box-uploader{:id => "s3_#{uid}"} = s3_uploader_fields(:aws_acl => aws_acl) - if limit > 1 %input{:type => 'file', :name => 'file', :multiple => 'multiple', :disabled => disabled} - else %input{:type => 'file', :name => 'file', :disabled => disabled} = render :partial => progress_bar_partial %script{:type => 'text/javascript'} :erb $("#s3_<%= uid %>").S3Uploader({ url: '<%= s3_uploader_url %>', progress_bar_target: $("#s3_<%= uid %>").siblings('.uploads').first(), progress_bar_template: $("#s3_<%= uid %>").children("script[type='text/x-tmpl']").first(), remove_completed_progress_bar: true, allow_multiple_files: <%= limit > 1 %>, file_types: '<%= [file_types].flatten.join('|').to_s %>', create_asset_url: '<%= effective_assets.s3_uploads_url %>', update_asset_url: '<%= effective_assets.s3_uploads_url %>/:id', dropZone: $("#s3_<%= uid %>").parent() });