similar to: POST op parameters are coming in as StringIOs

Displaying 20 results from an estimated 500 matches similar to: "POST op parameters are coming in as StringIOs"

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 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 +
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
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 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
2010 Jun 10
1
RSpec 2 equivalent for: assigns[:message].should == @message
describe MessagesController, "POST create" do before(:each) do @message = mock_model(Message, :save => nil) Message.stub(:new).and_return(@message) end context "when the message fails to save" do before(:each) do @message.stub(:save).and_return(false) end it "assigns @message" do post :create assigns[:message].should
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
2005 Nov 15
11
Collecting thread: Too many open files (Rails+SCGI crash)
I have a problem with running Rails 0.13.1 with scgi_rails 0.4.3 and Apache. After running for some time (more than a day), the SCGI process stops with the following error (from scgi.log): -- [ERR][24189] Collecting thread: Too many open files [ERR][24189] /usr/local/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:188:in `accept''
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 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 =
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 19
0
file_column error: tmp file created but not actual
Hi When I submit the form with field_column, the actual image is not uploaded, only temp files are crreated and I dont see actual file created and the image file name is not in the database and get "fieldWithErrors". Then if submit again, the actual file in created and an database record is generated. Here is the log file. I print @params and @wallpaper. I find the following: 1st
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
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> <%=
2007 Jan 26
0
Problems with assert_select in integration tests
I''ve been battling with assert_select in my integration tests for several evenings now. I''m testing a multi-step form, and after submitting the first step, my assert_selects fail on the attempts to find the form on the next page. However if I print out the response object, it has the exact text of what I''m trying to match. Here is the complete integration test. The
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 05
1
Testing custom mongrel handlers?
Hey Folks- I''m trying to setup a new test/spec harness for testing Merb. I was wondering if there is a way to mock the Mongrel request, response objects easily to test my handler without actually running a server? I can easily do the env hash but I''m not entirely sure what needs to go in the request StringIO object that gets passed into my mongrel handler''s