search for: iostr

Displaying 7 results from an estimated 7 matches for "iostr".

Did you mean: instr
2005 Dec 31
4
How might I use file_column for incoming email attachments?
I''m writing a ''Mailman'' model that catches emails sent to my application (kind of like backpack, I think). The trouble is that I''d like to save image attachments in the same was that file_column saves them--in fact, I''d really like to use a simple assignment like photo.image = attachment to save the image in its proper place. However,
2006 May 24
0
Mongrel errors on file upload
...t browser-dependent. The error listing starts with "Error calling Dispatcher.dispatch #<TypeError: superclass mismatch for class Tempfile>". I''ve included the entire error listing below. The controller and view code is given below. The CGI file upload delivers either an IOString or a Tempfile, depending on the size of the file being uploaded. I''m using a 3K file to test IOString, and a 10K file to test Tempfile. Both are XML text files. The scenerio that produces the error is: 1) mongrel_rails start 2) launch brower and nav to http://localhost:3000/create 3)...
2006 May 17
2
Problem uploading files
Hi everyone, 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 %>
2006 May 04
3
File Upload problem when file is small, under 19k(read method returns nothing)
Hi I hope someone can shed some light on this have searched a lot but found nothing definite. This happens on Ubuntu and Fedora 2. I am having a problem with uploading small files (images gif or jpeg under 19k). According to ruby documentation these are stored temporarily as StringIO objects rather than temporary files (as is done with the larger file uploads). The problem is that when it
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 Mar 23
0
Reading image file field data directly into RMagick
...ect without having to temporally save the image file first. Assuming my file field param is assigned to @temp_file, i tried RMagicks from_blob method: img = Magick::Image::from_blob(@temp_file.read) But i get an error message saying that the blob is empty. I also tried feeding it the entire IOString object returned by the file field, but it can''t deal with it either. Anybody knows how this can be done? Thanks. sebastian
2005 Dec 20
0
Testing file upload
...ello, I''m having trouble writing tests for a page uploading a file. I have followed the instructions form the Agile book (p. 363) and the upload works but I would like to write some tests around it. When I print the type/class of the file object being created by form it gives me "IOString", however it is missing the attributes "original_filename" and "content_type". Since I''m using these, my tests obviously complains. The book talks about the object being "an interesting hybrid (file-like with attributes)" but does not specify more...