similar to: Upload problem when file is small/StringIO

Displaying 20 results from an estimated 6000 matches similar to: "Upload problem when file is small/StringIO"

2006 May 01
0
Upload problem when file is small/StringIO (read method return nothing)
Hi I am having a problem with uploading small files. These are StringIO objects rather than temporary files as with the larger file uploads. The problem is that when it is a StringIO rather than a temporary file nothing is returned from the read method. example code where "image" is the file upload form parameter, it works fine if image is over round 19k but is it is smaller then
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 Jul 21
1
setting image resolution with Rmagick
Hi Has anyone had success with setting image resolution with Rmagick. I am resizing an uploaded image with Rmagick, problem is it keeps the original images resolution and I want to change it to 72dpi. <<<<<< code example >>>>>>>>>> # these are the various techniques I have tried when and after reading the file, trying any or all of them does
2006 Apr 12
0
StringIO - getting filename for multipart form uploads?
All, When using multipart forms, sometimes the files come into the controller as StringIO objects. I assume that by the time I get a StringIO object, I can''t get the name of the file the way that I might be able to using File.original_filename, correct? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2013 Mar 15
2
Icalendar.Parse(StringIO.new(aString)) complains about missing method, bytesize
I need to send an ics file to a web service, so however it gets there it will arrive as a string. Is there another way to begin Icalendar''s Parse than with a file? I''m currently sending the file using the curl command... curl -v --data-urlencode ics at invite.ics http://127.0.0.1:4567/ics2event I''ve tried curl''s --data-binary and sinatra''s
2006 Apr 03
0
N file uploads from one post - one File, (N-1) StringIOs
All, Win XP Ruby 1.8.4 Rails 1.1 I have a multipart form that I am posting with a dynamic number of file_fields that are generated on it, say N. When I post this form and look at the form params, I see one "File" object and N-1 "StringIO" objects. It appears that I should be able to manipulate these the way that I would like (file-wise), so I think it''s not a
2008 Mar 18
0
no marshal_dump is defined for class StringIO
Hi all, I''m newbie to ROR, anybody know why I would be getting the following error when I use paginating_find with memcache "no marshal_dump is defined for class StringIO" Im just using the plugin straight out with very default options like from the documentation. Thanks in advance. -- Posted via http://www.ruby-forum.com/.
2006 Dec 17
1
file_column error: StringIO Instead of Temp_File
Hi all, i am using file_column to upload 3 images from the same form, they are all different names and DOM IDs so there isn''t a problem with the multiple upload. The problem is when i try to upload a file (or 2, or 3) sometimes it works, but sometimes i get this in the log file: "bar_image"=>{"file_temp"=>"",
2006 May 24
0
POST op parameters are coming in as StringIOs
I''m receiving a multipart post request from another server. The request parameters are being received as StringIOs, rather than plain strings. For instance : Processing MessagesController#receive (for 83.166.68.31 at 2006-05-24 10:36:53) [POST] Session ID: eedafb24033be0714f8133f02810083f Parameters: {"message"=>#<StringIO:0xb7503358>,
2007 Dec 17
3
not able to view the images after the upload
hi, i have this problem where in i''m able to upload the images using file_column to the server but i''m not able to view the images.i''m not able to see the images but then i''m able to view the image name when i click on my show action. can any one please help?? THIS IS MY LOG as to what happens when i do the image upload. Processing UploadController#create
2006 Jan 12
3
VCard Upload Import
I''m trying to add Vcard import functionality and I keep getting the following using the code provided below. I''m using the VPIM library to decode the vcards and add them to my database table. Can someone help me out, or point me in a different direction for importing VCards. Thanks. Error: cannot convert StringIO into String Controller Code: require
2007 Nov 12
0
Version 1.2.1 Geego cms
Hi Version 1.2.1 of Geego cms for Ruby on Rails was released today. Geego is for developers and designers that want to provide fully updatable websites for their clients. The main new ingredient in this release are the Italian lanuages files for the admin interface. More information can be found at http://www.geegocms.com All the best Ant Peacocke
2007 Apr 27
3
Image upload problem.
I''ve seen posts of a few people who have this problem, but not a single response about solving it. I can''t upload .png files, but .jpg and .gif work fine. When I upload just a .png, my action gets a StringIO object which breaks when I try to copy the upload to an absolute location. However, using multiple-field upload, as long as one of the to-upload files is *not* a .png, all
2006 Feb 20
1
Upload Text File into a string
I''m trying to upload a text file from a form and read the file into a string in my rails app. I''ve tried using @import_file = File.read(params[:import_file]) as well as File.open, but I need getting "cannot convert StringIO into String" errors. Anyone have any ideas? - Kyle -- Posted via http://www.ruby-forum.com/.
2006 Apr 03
4
Multiple file uploads - only one file object gets posted
All, Trying to upload multiple files. Form: <% index = 0 for @image in images do %> <TR> <TD> <%= @image.path.split(''/'').last[0..39] %>: <% if ((! @image.path.nil?) && (@image.path.length > 40)) %> <%= h("...") %> <% end %> </TD> <TD> <%=
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 Feb 01
1
Class of uploated file
Hi, i have small problem when you upload file by input type=file to rails then in rails it is represented by one of following StringIO, File, Tempfile Is it all? Or can it be represented by also other class? I need to know this because i have my own validation of file kind and when is mime type invalid then i want to put msg to record.errors and i also want to dont upload this file in next
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 Feb 12
0
problem serving files which start with newlines
I''m working on a rails app that stores files in a database and allows users do download them again. But when a file starts with newlines they get lost in the process and the browser marks the download as failed because the received filesize is smaller then the expected filesize (the difference is exactly the newlines missing). To reproduce this place something like this an a
2006 Apr 12
5
File upload doesn''t work in production mode
Can anyone understand what the production.log file is telling me. I''ve tried playing with the permissions for the folders and it makes no difference. Every time I submit the form to upload the file I get "Application error (Rails)" which doesn''t really help. Processing DocsController#create (for 82.152.151.194 at 2006-04-12 12:44:13) [POST] Session ID: