From e91c153257db7e35b6fe37956f99b1f074373363 Mon Sep 17 00:00:00 2001 From: MrZYX Date: Mon, 11 Apr 2011 17:08:36 +0200 Subject: [PATCH] fixed #1013 thanks jbivins --- app/controllers/photos_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index 1291513d1..94f40d728 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -217,6 +217,7 @@ class PhotosController < ApplicationController rescue RuntimeError => e raise e unless e.message.include?('cannot generate tempfile') file = Tempfile.new(file_name) # Ruby 1.8 compatibility + file.binmode file.print request.raw_post end # put data into this file from raw post request