similar to: request.raw_post into Tempfile

Displaying 20 results from an estimated 40000 matches similar to: "request.raw_post into Tempfile"

2008 Jul 09
2
setting request.raw_post with rspec-rails
... is there a way to do this? We have some REST-ish POSTs we''d like to spec out. In the controller this gets accessed with request.raw_post.to_s, is there a way to set this with rspec? Thanks as always, Francis
2006 Sep 19
1
No request.raw_post when using RJS template?
Hi all I wanted to try out the RJS thing for updating more than just one HTML element using AJAX. I have a selection like that: <select id="booking_musician_profile_id" name="booking[musician_profile_id]"> <option value="4" selected="selected">Danc!ng TortoYse</option> <option value="2">DJ Psyhigh</option>
2006 Dec 08
2
Windows Tempfile Fix Plugin
Hi all, Yesterday, I had some problems reading JPG files in my tests. Turns out the problem was that Windows Ruby doesn't set it's Tempfile to work in binary mode. Since I deploy on Linux, that has never been a big problem, but now I'm working on some software that works with binary files exclusively. Anyway, I am making this fix available as a Rails plugin. The details can be
2006 Dec 08
2
Windows Tempfile Fix Plugin
Hi all, Yesterday, I had some problems reading JPG files in my tests. Turns out the problem was that Windows Ruby doesn't set it's Tempfile to work in binary mode. Since I deploy on Linux, that has never been a big problem, but now I'm working on some software that works with binary files exclusively. Anyway, I am making this fix available as a Rails plugin. The details can be
2005 Nov 27
0
How to get raw_post in functional tests
Hi ! I'm testing PayPal integration, and am using the Paypal gem. The Paypal gem requires the raw POST data, and not the pre-munged version that Rails uses. Running in dev mode, everything works fine, but in the tests, I can't seem to get at the data. I did: class ActionController::TestRequest < AbstractRequest #:nodoc: def raw_post raise "RAW_POST Request" end end
2009 May 09
0
XMLRPC raw_post getting run through Hash#from_xml
Im trying to create an api, and Im having trouble getting ActionController to not run the raw post data through Hash#from_xml (request.parse_formatted_request_parameters) for the XMLRPC post data. I essentially want it to run through XMLRPC::XMLParser::REXMLStreamParser.new.parseMethodCall(request.raw_post). However, I can''t figure out a clever, clean way to get
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Default to mktemp, not tempfile
Commit-ID: b0626ba1febdb535a674743070dfc3f3c5735b29 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=b0626ba1febdb535a674743070dfc3f3c5735b29 Author: Andrej Shadura <andrew.shadura at collabora.co.uk> AuthorDate: Fri, 7 Sep 2018 10:34:11 +0200 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:55 +0000 [klibc] dash: builtin:
2011 Mar 18
1
[Patch suggestion] Adding 3rd arg to tempfile() to set extension
The other day I was working on an example which used tempfile() to create file for use by the graphics device. And while I love tempfile()---as it is portable and clever and the files get cleaned by R and all that---I noticed one missing feature I would like to see: beside a starting name pattern, and an optional directory, an 'file extension' argument would be nice to have. As e.g. in
2010 Dec 05
0
Rails - Using Tempfile to write on Heroku?
Hello, I need to be able to write a temporary file for use during the request only. Locally I can use the following successfully: tempfile = File.open(a.original_filename,''w'') tempfile.write_nonblock(a.body) paperclip stuff........ tempfile.close That works great, but not on Heroku... How can I do the above with Heroku''s restrictions:
2010 Jun 17
2
tempfile problem
G'day all, The documentation for tempfile states : "The names are very likely to be unique among calls to tempfile in an R session and across simultaneous R sessions. The filenames are guaranteed not to be currently in use." My problem I think relates to the second part of the sentence, which is the guarantee... and it is being met ... but I need to save the files as .png files,
2011 Mar 19
1
Safe/sane tempfile creation?
I'm used to Debian-based distros which have a tempfile(1) utility for safely and sanely creating temporary files. There isn't a comperable utility for RHEL/CentOS systems. I've been exercising Google-fu looking for a good robust tempfile generation idiom, but haven't turned one up yet. Hence this appeal to the lazyweb. -- Dr. Ed Morbius, Chief Scientist / | Robot
2010 Mar 26
2
file upload error(can't convert Tempfile into String)
i tried a method to implementa file uploader by using amethod below this is ma controlller method to upload def save_imports Contactslist.save(params[:list]) render :text => "File uploaded successfully" this is ma view file .remote - form_for(@list, :url=> save_imports_list_path(@list, :format => "js"), :html => { :multipart => true,
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
2005 Jul 08
1
Possible Solution to Tempfile error (for documentation)
Dear List: I'm posting this to provide a possible solution and to document to what appears to be an R limitation. The solution is more of a cheap hack that works for now. To provide a little background, I am looping through a dataframe and creating Sweave documents using data from each row in the dataframe. It appears that this technique is not scalable to large dataframes without making some
2011 Aug 19
1
How to post a file via HTTP as multipart/form-data to Facebook?
I would like to post a new photo to a user using `Net::HTTP::multipart` from a Heroku application to Facebook. I have the following JSON object: {"message"=>"My message", "image"=>#<ActionDispatch::Http::UploadedFile:0x00000004242490 @original_filename="neEZYMAnBI.jpg", @content_type="application/octet-stream",
2010 Sep 23
3
superclass mismatch for class Tempfile
I''ve been facing a problem when generating a model (or controller, ...). I''m using rails 2.3.8 and ruby 1.8.7. Has anybody been facing anything like this? script/generate controller test /usr/lib/ruby/1.8/tempfile.rb:12: superclass mismatch for class Tempfile (TypeError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require''
2012 May 25
2
cannot generate tempfile `/tmp/puppet.30616.9'
I have three (out of 90) machines with the error: cannot generate tempfile `/tmp/puppet.30616.9'' I have plenty of disk and plenty of inodes. My temp directory is permissioned: drwxrwxrwt 4 root root 20480 2012-05-24 01:33 /tmp I get these for two puppet items on each row. The daemon is not running. I run it manually using /usr/sbin/puppetd --verbose --no-daemonize --onetime
2020 Jul 09
0
Is this surprising behavior of tkimage.create function a bug?
tkimage.create function can read some images but can't read the other images. We can reproduce it by running the code below. ------------------------------------------------------------------------------------- library(tcltk) library(magick) # works fine tmp <- tempfile(fileext = ".gif") image_write(logo, tmp) image_tcl <- tkimage.create("photo",
2008 Dec 10
2
read.*: How to read from a URL?
The question is how to use a URL in place of a file= argument for read.*.functions that do not support this internally. e.g., utils::read.table() and her family all support a file= argument that can take a URL equally well as a local file. So, if I have a file on the web, I can equally well do > langren <- read.csv("langrens.csv", header=TRUE) > langren <-
2006 Mar 19
1
Sending post request with post_form
Basically I have a controller with this: @lang = params[''lang''] || ''en'' @errors = request.raw_post @feed_stats = Net::HTTP.post_form(URI.parse("http://www.google.com/tbproxy/spell?lang=" + @lang), @errors) render :text => @feed_stats However whenever I run this I get an error message: undefined method `post_form'' for Net::HTTP:Class