similar to: File field

Displaying 20 results from an estimated 30000 matches similar to: "File field"

2008 Jul 14
1
about string error for upload file in rails 2.1
hello: I have code for upload image file to server file system.This works in rails 1.2.3.But in rails 2.1,it gets an error. The following is the important code: In a view: <%form_for :user,:url=>{:action=>"register"},:html=>{:multipart=>true} do |f|-%> <p> <label>照片</label> <%=f.file_field "file"-%> </p>
2006 Mar 29
0
freeze_gems broke my app
WinXP/ruby1.8.4/rails1.0. did a "rake freeze_gems" and got: ------ Freezing to the gems for Rails 1.0.0 rm -rf vendor/rails mkdir -p vendor/rails The filename, directory name, or volume label syntax is incorrect. The filename, directory name, or volume label syntax is incorrect. The filename, directory name, or volume label syntax is incorrect. The filename, directory name, or volume
2010 Feb 26
2
Routing Error using Paperclip
For some reason I can''t figure out why I am getting a routing error when I add Paperclip support. I have another test app when similar code is working. I created a new test app first without Paperclip support and it was doing the CRUD operation fine. However when I added Paperclip support I get the following error? Routing Error user_url failed to generate from
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 Apr 01
0
Many file fields w/same name don''t show up as params array
All, I have a page where I am allowing the user to specify multiple image files that are related to one HTML document. I''m trying to set up my file_field correctly but am having trouble. I''m trying to post into an array of images that belongs to a document. I''ve tried: <%= file_field(''document'', ''image[]'') %> <%=
2008 Aug 31
1
File field becomes String
I have a file_field that works fine when sending up a file. But when making an update the same field behaves like a String, and consequently the params[:file][:attachment].content_type fails. Why is this? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2005 Dec 23
1
Handling file uploads & mixing class and instance vars
Hey Everybody, This is the only way I''ve been able to get my file upload to work: class Item < ActiveRecord::Base def file=(upload) @file=upload end def after_create File.open("public/items/#{self.id}.jpg", "w") { |f| f.write(@file.read) } end end The upload form has "file_field ''item'', ''file'',
2010 Jul 11
0
Attachement_fu error when updating existing photos
Hi, I am attempting to replace an exiting photo with a new one uploaded by the user. I am using attachment_fu and I am coming up with the following exception: can''t convert nil into String /vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:23:in `join''
2010 Sep 21
0
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
2007 Jul 05
2
undefined method `original_filename' for "random.jpg":String
I have a problem getting attachments to work in a specific case... I have the following data model (this is a relevant subset of it): - a log can have many journals - a journal belongs to a log and can have many attachments - an attachment belongs to a journal When adding on a new journal to an existing log the new journal form and the corresponding controller handle the attachment as well and
2016 Feb 08
1
--link-dest not working on remote server (running daemon)
Hello, I have read through the list of previous issues regarding this issue but haven't been able to resolve mine. I apologize in advance for the long text and am probably doing some simple typo. I have two servers in my setup: *Server 1* Doing rsync with --link-dest daily and working as expected. I'm getting the hard links in the new daily directories. *Server 2* Running rsync daemon
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 Feb 05
0
validating presence of file uploads
not sure whats going on here, but I''m using some pretty standard code to manage file uploads in to a db, but having trouble detecting if the file upload field has been filled or not. in my Asset Model, I have: def asset=(asset_field) self.name = base_part_of(asset_field.original_filename) self.content_type = asset_field.content_type.chomp self.data = asset_field.read end def
2010 Sep 20
0
file_field
At: http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm You can find: <%= file_field ''upload'', ''datafile'' %> I saw the file_field documentation from here: http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-file_field But, still cannot get how the parameters ''upload'' and
2005 Dec 17
2
Testing flickr
Hi, I watched the flickr demo video some days ago and I was impressed of Rails so I decided to test it my self.. I put it on my web server on windows (Apache2/fcgi/Rails1.0). All works well but I have this in my log: Processing FlickrController#search (for 127.0.0.1 at 2005-12-17 15:00:02) [POST] Parameters: {"commit"=>"Find", "tags"=>"flower",
2006 Mar 06
1
Uploaded File to Database
Hi, I currently write a tool for my school. Therefore I have to save uploaded files. I bought Agile Web Dev. with Rails to learn webdev with Rails. I''m very new at rails and couln''d find anything on the internet. Now when I want to save the file data to the mysql database, rails gives me an error. My code is the same as written in the book on page 363. Here is my code of the
2005 Dec 19
1
Question about rjs templates
Hi everyone I read some support about rjs templates at http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates but when i download the rails1.0, i could not find the code in http://dev.rubyonrails.org/changeset/3078 ,and i also could not find the file actionpack/test/fixtures/test/delete_with_js.rjs is something wrong with me.thanks for your answers. -- Posted via
2006 Jan 22
1
file_field questions
A couple questions about file_field elements. First, with code such as this: <%= file_field ''attachments'', ''filename'' %> Would the filename of the file I select be the value that''s stored within the database under the "filename" column, and then I would just add in code in my "create" controller to upload the actual file?
2006 Jan 28
1
RailsCron 0.2 questions
Hi all, I''ve set up RailsCron to send email reminders on a daily basis. My dev environment is Rails trunk on Debian Sarge, lighttpd running as a regular user. I''m having two issues: 1) When I run "rake cron_start", I get rake aborted! undefined method `blank?'' for "":String The "blank?" method is provided by Rails, so I''m
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