search for: uploaded_files

Displaying 20 results from an estimated 39 matches for "uploaded_files".

Did you mean: uploaded_file
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
2011 Mar 26
2
upload file, read first 10 lines.
I have a csv file and in my controller: uploaded_file = params[:upload][:csv].read @rows << FasterCSV.parse(uploaded_file) I want to put in @rows only the first 10 lines but the read method reads all the file. How can I do? -- 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
2006 Jul 26
4
Upload File
I got this error: NoMethodError in PictureController#new You have a nil object when you didn''t expect it! The error occured while evaluating nil.uploaded_file= and the line code is here: @picture.uploaded_file = @params[''picture_file''] -- Posted via http://www.ruby-forum.com/.
2007 May 16
1
Rails, Mongrel and Rmagick
i have a rails app with a form that allows uploading an image file. I take the image file and read it into rmagick to verify that it''s an image. For some reason I can''t catch an exception thrown by rmagick inside the app. After an invalid image file is uploaded the process just hangs. I have to kill mongrel and restart to use the app again. img =
2006 Jun 08
1
Permissions on uploaded files, TinyFile
Hi, im getting a little trouble with this, im using TinyFile as the example to upload files http://wiki.rubyonrails.com/rails/pages/TinyFile/versions/20 All goes well but the files uploaded are saved with permissions 600 (linux) and in the case of images arent showed on the browser(but uploaded and stored in the server without problems) i have to manually ftp to the uploaded files folder and
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 Jun 09
8
[how can i delete a file system..please help]
Hi, I''m trying to delete a file system (<xml_26548975.xml>) File.delete("xml_26548975.xml") But I get this error: "Permission denied - ./script/../config/../uploads/xml_26548975.xml". Why? -- Cheers, ioana k&a http://boulangerie.wordpress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Sep 05
2
Mongrel and umask for uploaded files
So any files that are uploaded through my form are getting the following mode: -rw------- I need them to have: -rw-r--r-- I''ve tried setting the umask in a script file called set_umask.rb as follows: File.umask(022) and then starting mongrel using: mongrel_rails start -m config/mime.types -S set_umask.rb but it doesn''t seem to change the mode that the files are created
2006 Aug 15
8
AGAIN: file object treated as string
I am trying to implement the uploading of a file to a remote server I get error while trying to write the file on the server. The error I get is the following: undefined method `rewind'' for #<String:0x2aaaad062eb8> It seems to be treating my file as a string instead of a File object. --------- Code is below ------------------ VIEW: <%=
2006 Jan 09
1
Saving an upload
...NOT NULL, picture_id integer NOT NULL, "position" integer NOT NULL, primary key (film_id, picture_id) ); Here''s the Ruby: film.rb: class Film < ActiveRecord::Base has_and_belongs_to_many :pictures, :join_table => "films_pictures" attr_writer :uploaded_files attr_reader :uploaded_files validates_presence_of :name, :description, :has_subtitles, :is_censored end picture.rb: class Picture < ActiveRecord::Base has_many :films has_many :comics acts_as_list :picture_id attr_writer :parent_id attr_writer :type validates_presence_of :f...
2013 Oct 10
12
What's the best way to approach reading and parse large XLSX files?
...39;creek'' class UploadFiles < ActiveRecord::Base after_commit :process_files attr_accessible :inventory, :material_list has_one :inventory has_one :material_list has_attached_file :inventory, :url=>"/:current_user/inventory", :path=>":rails_root/tmp/users/uploaded_files/inventory/inventory.:extension" has_attached_file :material_list, :url=>"/:current_user/material_list", :path=>":rails_root/tmp/users/uploaded_files/material_list/material_list.:extension" validates_attachment_presence :material_list accepts_nested_attributes_f...
2006 Mar 29
7
Uploading files and writing them to server?
Where should I look for information on how to use Rails and Ruby to accept the upload of a file and then to save that file to the file system of my server? I''m reading the "Uploading a file" section of Agile Web Dev with Rails, but it''s geared toward saving the file in the database. Any advice? Thanks, Jeff -- Posted via http://www.ruby-forum.com/.
2006 Jan 05
4
testing file uploads
Hi all, I was wondering about the class used when rails receives file uploads. Sometimes it appears to be a File, and other times it is a StringIO. Also it has methods such as original_filename that don''t appear to belong to either of these classes. I ask because I''m trying to work out how to test my fil upload related models and controllers. Is there some standardised way of
2006 May 29
3
IFRAME based RJS - responds_to_parent
** File uploads with AJAX mojo ** Respond with RJS to your parent window with a form action targeted to a hidden IFRAME. Handles all the painful situations like scoping your JavaScript to your parent window generating the script block for execution and clearing the IFRAME after execution so the back button doesn''t re-execute the action. `plugin install
2006 Aug 15
0
file object treated as a string
I am trying to implement the uploading of a file to a remote server My upload form looks like this: <%= start_form_tag(:action => "save_image", :multipart => true) %> <td><b>Description</b> </td> <td><%= text_area("image", "descript", "cols" => 33, "rows" => 5) %></td>
2019 Feb 14
3
32 seconds vs 72 minutes -- expected performance difference?
...fied vers= in fstab, but something strange happened. While `man mount.cifs` claims that the following are allowed -- 1.0, 2.0, 2.1, 3.0, 3.1.1 (or 3.11) -- few of them failed with strange errors: # mount -t cifs -o rw,username=myuser,password=[REDACTED],uid=myuser,gid=myuser,vers=3.11 //[REDACTED]/uploaded_files /home/myuser/shared mount error(11): Resource temporarily unavailable Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) # tail /var/log/syslog [...] Feb 14 12:57:04 prod-backoffice kernel: [105926.746067] CIFS VFS: failed to connect to IPC (rc=-11) Feb 14 12:57:04 prod-backoffice ker...
2006 Dec 30
2
Another RSpec on Rails issue: how to test send_file()
Hi! Today I needed to implement some controller code, that uses send_file() to send image data. How can this be tested / specified with RSpec? bye, Tobias
2006 May 19
9
Resize uploaded image file without creating temp file?
Hi, I need to take a single uploaded image file and save three resized versions of it, a thumbnail, normal and large version. I was planning on doing this in my model by having an array of geometry strings and looping through them, each time saving a new image object resized to the correct geometry. I know that file column does similar stuff, but I would prefer to have a separate database row
2006 May 01
10
large file storing in postgres sucks?
Hi, I''m not sure if this is a postgres issue or not, but I''m using Postgres 8.1. I have (in my functional tests) the following code: upload = fixture_file_upload(''/files/podcast.mp3'', ''audio/mpeg'') post :create, :product => valid_product, :media => { :image => upload } And then in the controller: blob = Blob.create :data
2006 Feb 17
1
validate() with has_many association
I''m creating a simple portfolio site for a painter. I have a painting and an image model with following relationship: Painting has_many :images Image belongs_to :painting On the edit screen the user can edit the Painting data as well as upload pictures for a thumbnails and full size image. The Image model extracts filename, width, and height from the uploaded file, saves those