Upload form with uploadify jquery plugin

I would like to integrate the uploadify plugin with a standard rails
form. However I can’t figure out how to add a new field and have it get
submitted with the file upload. I added a name field into the form, but
the valued does not get submitted.

<%
dialog_file_description = ‘Photos’
allowed_extensions = [:jpg, :jpeg, :gif, :png]
max_size = 20.megabyte
allow_multiple_files = true
url = photos_path
photo_field = ‘#photo_photo
%>
<%- session_key_name = ActionController::Base.session_options[:key] -%>
<% content_for :jstemplates do -%>
<%= javascript_tag “window._token = ‘#{form_authenticity_token}’” %>
<%= javascript_include_tag “uploadify/swfobject” %>
<%= javascript_include_tag “uploadify/jquery.uploadify.v2.1.0.min” %>

<% end -%>
<% form_for(:photo, :id => ‘photo_upload’, :html => { :multipart =>
true}) do |f| %>
<% if protect_against_forgery? -%>
<%= f.hidden_field :authenticity_token, :value => (u
form_authenticity_token) -%>
<% end -%>
<%= f.error_messages %>

Name:

<%= f.text_field :name %>

<%= f.file_field :photo %>
UploadCancel
<% end %>

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs