Displaying 4 results from an estimated 4 matches for "uploaded_io".
2012 Nov 12
1
undefined method `original_filename' for nil:NilClass
...gt;
true, :as => :file %>*
* <%end%>*
* <input name=''commit'' type=''submit'' method=''post'' value=''Import''/>*
*<%end%>*
My controller:
*collection_action :status_race, :method => :post do*
*
*
* uploaded_io = params[:uploaded_data].original_filename*
*
*
* File.open(Rails.root.join(''app/importers'', ''uploads'',
uploaded_io.original_filename), ''w'') do |file|*
* file.write(uploaded_io.read)*
* end*
*
*
* RoutesQuickcom.new.run(uploaded_i...
2010 Aug 23
3
Unable to upload images using native rails file upload
...K
IT!!!!!!!!!!!!maybe a partial???
<dt><%= f.label "Category" %></dt>
<% @job.catergory.each do | f | %>
<dd>
<%= f.radio_button :name, :id %>
</dd>
<% end -%>
# UPLOAD a file for the logo in the controller?????
def upload
uploaded_io = params[:job][:logo]
File.open(Rails.root.join(''public'', ''images'',
uploaded_io.original_filename), ''w'') do |file|
file.write(uploaded_io.read)
end
end
#VIEW FILE views/jobs/new.html.erb
<dl>
<% form_for (@job, :h...
2010 Nov 01
1
Encoding::UndefinedConversionError on a simple file upload (rvm, MRI-1.9.2-p0, rails 3.0.1, apache+passenger)
Hello everyone.
I am having the encoding issue on a simple file upload action:
Encoding::UndefinedConversionError in MainController#upload
"\xC4" from ASCII-8BIT to UTF-8
The action looks like this:
def upload
@uploaded_io = params[:upload]
File.open(Rails.root.join(''public'', ''images'',
@uploaded_io.original_filename), ''w'') do |file|
file.write(@uploaded_io.read)
end
end
I changed File.open to ''wb'' (binary) and it woked fine. I al...
2010 Sep 27
7
Uploading photos
Hi all,
Learning RoR (and loving it!) to develop a website. A requirement of the website is enabling users to upload photos to be made viewable (dynamically) on the website. Is this something I can develop with RoR?
Thanks,
Jeff
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to