Displaying 20 results from an estimated 100 matches for "stringios".
Did you mean:
stringio
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>, "date"=>#<StringIO:
0xb7501...
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
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 Aug 09
5
HELP!!! New to Ruby
Hi all,
I am new to Ruby programming language. I know that require ''gemname'' is
used for using some gems in our application. I have a sample application
developed in Ruby on Rails which have the following lines of code:
require ''zlib''
require ''stringio''
Can you plz help me to know what these gems are used for. It would be
very helpful if
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 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 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/.
2006 Apr 29
0
Upload problem when file is small/StringIO
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:
File.open(path_1 +
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 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
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 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 Aug 17
3
file_column do download from URL
Is there a simple way of forcing file_column to download file from given
(ex. in form) url instead of uploading it manualy?
I know:
http://blog.caboo.se/articles/2006/01/09/file_column-magick-and-versions
require ''open-uri''
Attachment.find_first.filename = open(url)
if not working as expected... what is interesting is that:
>> @a =
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
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 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
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 Jun 07
5
File is nil
I don''t understand why my program does not get the file that I try to
upload.
It returns the following error when I try to upload a small file:
NoMethodError in LogfileController#create
You have a nil object when you didn''t expect it!
The error occured while evaluating nil.original_filename
#{RAILS_ROOT}/app/models/logfile.rb:9:in `file=''
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 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