Displaying 20 results from an estimated 24 matches for "file_field_tag".
2006 Jan 15
4
file_field vs. file_field_tag
Hi,
The documentation doesn''t make it clear why both file_field and
file_field_tag are both useful. What is the reason for having two
instead of just one of these?
Thanks,
Peter
2007 Jul 08
1
file_field_tag and rjs
Hello
Is it possible to add and remove file_field_tags on the fly on a form
using only rails code and rjs?
If so can someone provide a solution.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" gr...
2008 Jan 30
0
Making an object the same as is returned by file_field_tag
I''m using attachment_fu, and can make an attachment object (a Logo,
which is basically an image file) fine using the tempfile that is
returned from the file_field_tag on a form.
However, i also need to make some from some files that are saved
locally, in my public folder. I''m making a Tempfile object using the
local file, but when i pass it to attachment_fu, it fails and crashes
out.
Looking at the file i''ve made and the file that is sent ba...
2009 Jun 11
0
file_field_tag : what was the original file name?
My site allows users to upload csv files for processing. It all works
fine, but on the response I''d like to report something like "Your file
abc.csv processed OK".
Unfortunately I cannot seem to find the actual original file name in
the params, even though Firebug tells me it''s part of the post.
Any tips?
Thanks....
2006 Aug 02
3
Upload forms--where is the file object?
...rectory on the server. I''ve tried
following a couple of posts on this list, and the HowTo from here:
http://wiki.rubyonrails.org/rails/pages/HowtoUploadFiles
Here is the code in my view:
<%= start_form_tag ( {:action => "upload"}, { :mulipart => true } ) %>
<%= file_field_tag("file") %>
<%= submit_tag "Upload" %>
<%= end_form_tag % >
Seems simple enough, But the problem is the object being passed from the
view in params[:file] is a string object, not a file object, so it won''t
respond to any of the methods from the File class...
2007 Feb 09
7
Upload image without rmagic
I need a way to upload an image and display it without using any of
the plugins that use rmagic. I have used the plugins (file_column,
fleximage) which both use rmagic and gave me problems (never got
fleximage to work)
Thanks in advance - K
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2012 Mar 27
4
Upload
hello everyone,
i have written an upload controller which handles files in a multipart-
form. it scans through the bytes to check if it''s an acceptable file.
my problem is to get the progress of the upload of a single file. i
loop through my params to move every file to the server and it''s
working properly.
is there a method to check whether a file has been completely
2007 Dec 08
3
Uploading photos using facebook & attachment_fu
...at I''m doing now:
<% facebook_form_for(:my_object, :url => { :action => ''upload_photo'', :id =>
params[:id] }, :html => { :multipart => true }) do |f| -%>
<%= radio_button_tag ''my_object[my_param]'', "value" %>
<%= file_field_tag "photo[uploaded_data]" %>
<% end %>
Now that I''ve typed this out I''m realizing that the facebook_form_for
probably isn''t doing anything for me since i''m not using the f. helpers, but
I have two models that I''m trying to save data for...
2008 Feb 04
2
attachment_fu and form_tag for multiple models?
...w 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 the view...
<% form_tag( { :action => "add_profile" }, { :multipart => true }) do %>
<%= file_field_tag ''image'', :uploaded_data %>
<%= text_area :profile, :body, :cols => 25, :rows => 6 %>
<%= submit_tag ''Submit'' %>
<% end -%>
and in the add_profile method...
def add_profile
return unless request.post?
@image = Image.new(params[:im...
2011 Feb 18
1
why 'Template missing' error with form_tag?
...e to my
csv file, and click Upload, I get this error:
"Missing template uploads/process_file.html.erb in view path..."
Here is my view (in /uploads/new.html.erb)
<% form_tag ({:action => ''process_file''},
:multipart => true) do %>
<%= file_field_tag ''file'' %>
<p>
<%= submit_tag "Upload" %>
</p>
<% end %>
Here is my controller, (in /controllers/uploads_controller.rb)
def process_file
post = Upload.import(params[:file])
flash[:ok] = "data imported"
redire...
2010 Jun 15
3
RoutingError
...ion=>"show"}, diff: {:user_id=>2}
Extracted source (around line #23):
20: %p or
21: %p Upload a vCard file to import people into your account.
22: %p
23: - form_tag(user_contact_path(@user.id), :method => "post")
do
24: = file_field_tag "file"
25: = submit_tag
26: .span_2
--------------------------------------------------------------------------------
thank you,
aashish
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on...
2006 May 31
4
acts_as_attachment , someone using it?
Hi, i just found the acts_as_attachment plugin for image upload, seems
sogood but i cant find any docs about it, if someone here using it can
give some references or working examples about the plugin that will be
excellent.
So what you wanna rails today?
--
Posted via http://www.ruby-forum.com/.
2006 Mar 08
19
Creating multiple rows with one form
Hello. I''ve been trying this out for the past two days and I can''t seem to
get it. I''m going to have a page where you can upload x amount of images at
once. Lets say 10 images need to be uploaded, all with a caption.
I''d like to have a browse button to choose the file, then the caption. Now,
if I put 10 of them in one form, fill them all out and submit, I get
2010 Jan 22
0
Routing/File Upload/Put vs. Post puzzle
...I could be wrong about that.
index.html.erb:
What would you like to maintain?
<ul>
<li>Import for bulk Election load
<p>
<% form_tag :action => ''import_file'', :method => ''put'', :multipart
=> true do %>
<%= file_field_tag "importFile", :accept => "text/xml" %>
<br>Import as:
<%= submit_tag "XML file" %>
<%= submit_tag "YML file" %>
<% end %>
</p>
</li>
notes: There are two buttons in this form,...
2006 May 17
2
Problem uploading files
...yone,
I''m having trouble uploading some files. I''ve set up a simple action whose
view looks like:
<%= start_form_tag({:action => ''handle_file_test''}, {:multipart => true}) %>
<label for="file">File to Upload</label> <%= file_field_tag "file" %>
<%= submit_tag %>
<%= end_form_tag %>
<% if defined? @file.original_filename %>
<%= debug @file %><br />
<%= @file.original_filename %><br />
<%= @file.path %><br />
<%= @file.content_type %><br />
<% end...
2006 Feb 27
2
Upload & Parse CSV
Hi All
I was hoping you could help me. I need the ability to upload a large
quantity of data via CSV - via an upload form. The CSV file then needs
parsing and the data entering into the relevant module.
Does anyone have experience of this or perhaps knows of a posting,
generator, existing code or any help at all? I''ve been looking but not come
across anything so far. I can do this
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
2008 May 01
1
Strategy for importing temporary .csv file?
...#39;'thrown away''. These examples are
running ok, but I won''t be able to use this strategy in my production
environment...
Here''s my view code:
<%= form_tag(:url => {:action=> "post" }, :html => { :multipart =>
true }) -%>
<p><%= file_field_tag "file", :size => 75, :class => "csv-input" -%></
p>
<p><strong><label for="file">File to Upload</label></strong></p>
<p><%= submit_tag -%></p>
Here''s my controller code:
class ImportControl...
2006 Jul 22
17
Problem getting form_remote_tag to work with image upload
Hey guys,
I am trying to pass the parameters for the file being upload, but the
params[] are not being passed. Ive read through some posts and realize
this is an issue with RoR.
I read through some of the posts and someone suggested using:
http://svn.kylemaxwell.com/form_remote_upload/trunk/
I tried to install it, and although I thought I installed it correctly,
it doesn''t work.
2006 May 24
0
Mongrel errors on file upload
...quot;
end
end
end
------------ index.rhtml ------------
<h1>Choose the file to upload:</h1>
<%= start_form_tag({:action => ''read_in''}, :method => "POST", :multipart => true) %>
<label>File to Upload:</label>
<%= file_field_tag "file_to_upload" %><br/><br/>
<%= submit_tag value="Upload" %>
<% end_form_tag %>
--------------- read_in.rhtml --------------
<h1>File stored at:</h1>
<%=h @location_display %>
-----------------------------------------------...