similar to: Multiple File Upload

Displaying 20 results from an estimated 200 matches similar to: "Multiple File Upload"

2006 Jul 04
0
Uploading files - getting size
Hi, I want to get the size of an uploaded file that is saved in the database. Can you help me? In the edit view formular there is: <input id="attachment_title" name="attachment[title]" size="30" type="text" /> <input id="attachment_attachment" name="attachment[attachment]" size="30" type="file" />
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
2006 Apr 23
5
Controllers in folders and helper scope in Rails >1.0
Hi, Here''s my problem. I tried to google it, read the release-docs and haven''t found anything similar. My application uses folders to store controllers, as described in the Rails book. I need to have same-named controllers for admin and for users, so it looks like this: /app/controllers/admin/project_controller.rb /app/controllers/admin/...
2006 Jan 08
4
ID from child table not handled by AR
Hi all, Im slowly moving forward, but there''s something a miss. I can save some relational records to tables, but only once. For an unknown reason, the primary key (id) of the child table is not automatically increased. (I can only perform one save, (the first records id field holds the value ''0'') and during the next save it says: Mysql::Error: Duplicate entry
2006 Jul 07
3
quick send_data question...
Hi, I am using send_data to allow users to download files from the database but ran into a small problem, it seems that files upload fine but when they download only 64kb of the file is sent. I''m using the basic rails code from the Agile book: #upload code in my sheet model def file=(document_field) self.filename = base_part_of(document_field.original_filename)
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
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
2006 Jul 05
1
List of projects
Hi all, Did any body worked some thing like this? suppose a logs in and creates a new project.he''lll get the list of projects in the same page. till here i got working. Here is my question:: i want the list such that a drop down list will be there, and if i select a month i should get the list of projects done in the month. I used this code in the project_controller.rb
2006 May 29
3
File.size() on Uploaded Images Fail
I am checking the file size of an uploaded file and storing it in a filesize column. It will work just fine when the user uploads any files other than images (jpg,png,gif). Word, Excel, Powerpoint, .zip and more all work fine. This is my model asset.rb that handles the file upload. def newfile=(newfile_field) self.filename = base_part_of(newfile_field.original_filename) self.filetype
2006 Nov 20
7
Acts as attachement
Hi guys Question about acts as attachment still getting the following error undefined method `content_type'' I have set everything up according to the following page however i am still have trouble http://weblog.techno-weenie.net/articles/acts_as_attachment One thing, I have wanted to add this to an existing model in my system. I have not used the... script/generate
2009 Sep 09
1
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch Going Nuts!
Hi, I have been trying to do this for a few days now and cannot figure it out. I would be very grateful is anyone can help me I am trying to upload an attachment to AWS, S3 using paperclip, however every time I keep getting this error: ActiveRecord::AssociationTypeMismatch in ProjectController#create_notice Graphic(#37649720) expected, got Tempfile(#27280470) RAILS_ROOT:
2009 Sep 10
2
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch
Hi, I have been trying to do this for a few days now and cannot figure it out. I would be very grateful is anyone can help me I am trying to upload an attachment to AWS, S3 using paperclip, however every time I keep getting this error: ActiveRecord::AssociationTypeMismatch in ProjectController#create_notice Graphic(#37649720) expected, got Tempfile(#27280470) RAILS_ROOT:
2006 Jan 06
2
IRB hex values
Hi all, Im working on a copy contact info into project method. Nosing aroundwith IRB I see a hex value. Named Contact:0x40ca01cc #<Contact:0x40ca01cc @attributes={"name"=>"GP-net", "id"=>"7", "lastname"=>"Petersen", "firstname"=>"Gerard"}> Why is it there like that and not in a human readable
2006 Aug 01
3
paginate, search, sort with ajax problem
hello I hope somebody can help me figure this out. found this great tutorial at http://dev.nozav.org/rails_ajax_table.html. got it working except for one thing. I can''t seem to make the pagination work. The link_to_remote defined in the helper is pointing to the wrong url. I have set up things like so: defined a search method in de project_controller located in apps/admin/project.
2006 Jul 18
0
ffmpeg and IO.popen
i?m fairly new to ruby... any suggestions getting the below to work... i?d like to use myfile_field.read within encodeVideo and then self.data = Student_Interviews.flv class Myfile < ActiveRecord::Base . . . def encodeVideo opts #, stream IO.popen(?ffmpeg #{opts}?, ?w?)#{ |io| io.puts stream} end def myfile=(myfile_field) if myfile_field and myfile_field.length > 0 encodeVideo ?-i
2006 Feb 06
2
File_field and Firefox
Hi! Im developing a simple prototype of an application. It fills an oracle db with data about a file in the filesystem, and save the entire file in a blob along with some metadata. To get the file in the db i use a file_field form helper. All goes well with the radrails-integrated browser, but it doesnt work anymore in firefox. The problem is, firefox seems to cut the pathname from the file. Here
2005 Sep 07
0
model constructor errors.
I have a model; I do photo = Photo.new(parameters) parameters contains: {"picture"=>#<File:C:/DOCUME~1/BART~1/LOCALS~1/Temp/CGI3180.1>} so i expect that the def picture=(filename) method is called in this constructor.. this is not the case. Does anyone know why? params[:photo].each_pair do |id, parameters| photo = Photo.new(parameters) end class Photo
2005 Dec 16
3
Help with error
I am getting this error NoMethodError in Admin#add_to_project undefined method `find'' for #<Project:0x249da88> RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/ base.rb:1501:in `method_missing'' ./script/../config/../app/controllers/admin_controller.rb:65:in
2008 Jun 15
11
Ouch! Can't figure out this file upload issue...
Okay, so this is driving me crazy. I''m trying to do a file upload using code from a book. What happens: I get wrong number of arguments (1 for 0) in the upload controller save action. No idea why. Schema: The schema for the picture model object is just a textfield named comments and a binary field called data. Upload controller: def get @picture =Picture.new end def save
2019 May 31
1
Inconsistency with LANMAN1 and Samba 4.9
On Fri, 2019-05-31 at 22:33 +0200, Andreas Reichel via samba wrote: > On 31.05.19 22:07, Andrew Bartlett wrote: > > On Fri, 2019-05-31 at 11:40 -0700, Jeremy Allison via samba wrote: > > > On Fri, May 31, 2019 at 07:09:44PM +0200, Andreas Reichel wrote: > > > > > > When adding me as the user with 'smbpasswd -a andreas', and entering a password, > >