similar to: Many file fields w/same name don''t show up as params array

Displaying 20 results from an estimated 10000 matches similar to: "Many file fields w/same name don''t show up as params array"

2006 Mar 29
1
Posting multiple files - how to set up params correctly
All, I have a page where I am allowing the user to specify multiple image files that are related to one HTML document. I want to end up with an array of image files that I can then assign into an array within the controller. I''m trying to set up my file_field correctly but am having trouble. I''m not clear on how "the multiple input tags with the same name turning into
2006 Mar 13
2
Newbie: Can''t get file to upload
Since I can''t get the fancy upload progress thing to work, I thought that I would revert back to a regular file upload scenario. I have a very simple file upload form set up. It appears that my file parameter is coming into the controller as a string, not a file object. Here''s my view: <%= form_tag :action => ''save_HTML'', :multipart
2011 May 05
1
Array params in form_tag
Hello i have a lot of time trying to figure this out. I am having problem sending array params with form_tag :remote=>true form.erb <%#= form_tag reporte_client_reports_path do%> <%= form_tag reporte_client_reports_path,:remote=>true do%> <p> <%= label_tag :cuts %> <%= select_tag "cuts[]", options_from_collection_for_select(@cuts,
2006 Apr 10
3
Upload an image
Hello there. :-) I have this view: <%= form_tag({:action => ''create''}, :multipart => true) %> <table> <tr> <td>User</td><td><%= text_field("user","name") %></td> </tr> <tr> <td>Image</td><td><%=
2006 Jul 03
0
Multiple File Upload
Hello together, I developed a file upload in my application like this (files uploaded belong to a project): project_controller.rb: ---------------------- def upload_attachment project = Project.find(@params[:id]) begin project.attachments.create(params[:attachment]) rescue flash[:attachment_error] = "Error at Upload" end redirect_to :action => "edit_project", :id
2006 May 02
0
Validation in File Upload
I have an app whose admin allows users to upload PDFs to populate a "newsletter" section. I''m having trouble getting validation to work properly. I want to be sure that a name, description & file are specified in the form. The app seems to catch the error and won''t write a row to the DB but it will create a file sized 0KB in the upload folder and it
2006 Mar 15
1
File Upload Problem
works fine with webbrick but when running through dispatch.cgi or .fcgi it fails with this error: malformed header from script. Bad header=image/jpeg: /home/emh/phocab.com/public/dispatch.cgi or if using fastcgi: FastCGI: comm with server "/home/emh/phocab.com/public/dispatch.fcgi" aborted: error parsing headers: malformed header ''image/jpeg'' i repeat, it works
2005 Dec 31
2
Validation errors not displaying and will not save
Hello all, I''m fairly new to rails so I''m probably doing something really stupid here.... I have been banging my head at this for hrs now... I''ve tried so many different things and nothing seems to get me any further... I am trying to create an image uploading page that will simultaneously create thumbnails to separate file directories and update the database via
2006 Jun 28
2
Ajax - Upload File Upload
hello, i have a problem. I want to upload a file with ajax and the following tag: submit_to_remote ''button_save'',''Speichern'',{ :url => {:action => ''ajax_update'', :id => @product}, :update => ''formular'' } it doesn''t work, my form_tag looks like: form_remote_tag(:url => {:action =>
2006 Jan 11
0
error_messages_for >> Cannot convert Array into String
Hi all I have the following Model: Member(id, username, first_name, last_name, hashed_password, password_salt) Now I want to allow users to register for an account using the following form: --- <%= form_tag %> <%= error_messages_for ''member'' %> <p><%= _(''Username'') %>: <%= text_field(''member'',
2010 Feb 14
2
paperclip is making me crazy
seems pretty simple, my model... has_attached_file :pic_1, :styles => { :thumb => "120x90" }, :url => "/:attachment/:id_:style.:extension", :path => ":rails_root/public/system/:attachment/:id_:style.:extension" my view... <% form_tag(:action => ''create'', :html => { :multipart => true }) do -%> <label
2006 Jun 19
3
can''t dump anonymous class Class
I''m trying to create a document upload system, where most of the code is the super class Document and just the path to file on the system is controlled by the sub classes. When I attempt to use my code, I get the following when I try to save the document. can''t dump anonymous class Class Any ideas? ** Migration ** class CreateDocuments < ActiveRecord::Migration def
2006 Mar 13
0
Controller handling of Non-model fields
I''m a bit confused about how the Controller works for calls that aren''t intended to be remote (non-Ajax). Specifically, if I don''t want to interact with a Model. Does ":action => whatever" always result in a call to the server? Or is it handled like a javascript function (locally, on the client) in the cases where no Model interaction is needed? For
2006 Jul 28
1
How do I get an original file name from an upload using file_field?
I am uploading a .csv file for importing into a database; however, this file does not need to be saved on the server. How do I get the file name of the original file? I know about the file_column plugin but I don''t need/want to save the uploaded file on the server, I just need to import it and delete it. Right now the file name get returned as some random temp file name... there has to be
2006 Apr 03
4
Multiple file uploads - only one file object gets posted
All, Trying to upload multiple files. Form: <% index = 0 for @image in images do %> <TR> <TD> <%= @image.path.split(''/'').last[0..39] %>: <% if ((! @image.path.nil?) && (@image.path.length > 40)) %> <%= h("...") %> <% end %> </TD> <TD> <%=
2008 Feb 04
2
attachment_fu and form_tag for multiple models?
hi, i''ve got a page where i''m trying to save the user''s profile information and an image of the user, but i''m having trouble with using attachment_fu and the form_tag method. now i know attachment_fu isn''t designed for form_tag but am really hoping someone has a solution for this as frankly i''m stumped. here''s the form_tag part in
2006 Dec 11
5
using form_tag with a get request with params
I''m trying to create a search field using the form_tag helper. The problem is when I enter a search, the url_for returns an address such as host.com/search?term=foo. I want to use the format host.com/search/term. I have it set up in routes to recognize the format search/:term, but form_tag always uses the format host.com/search?term=foo. Does anybody know how to do this? Cheers! Ray
2006 Jul 26
5
code for uploading files to the filesystem instead of db
Does anyone have any standard code for uploading files to the filesystem? I''ve got code already for uploading images to the database but I''d prefer to store the files on the filesystem. In particular I need to know how to (a) ensure a file has been selected in the file_field (b) how to extract the filename from the file_field (c) how to actually move the file from client to
2006 Jul 31
4
Text field not being submitted via form_remote_tag; works via form_tag
Hi everyone, Newbie here. I''m trying to get a textual form element to submit in the context of a form_remote_tag block and having little success. Oddly (or perhaps not), using regular old form_tag in its place does cause the elements to be submitted. Here''s the relevant partial ERb code: <%= form_remote_tag( { :url => { :action => :out, :id => pending_task } } )
2006 Jun 20
2
Problem with "can''t dump anonymous class Class"
I submitted this earlier, but the web forums went down and I''ve screwed up the thread, so I''m starting over. I''m trying to built a document upload system. The system has a main Document model with different subclasses for different types of documents. With the code below, if I attempt to create a Document, it works fine, but if I attempt to use one of the subclasses, I