From 7f8c79f3d886323c328066dce5f97ee7b34edda7 Mon Sep 17 00:00:00 2001 From: Daniele Date: Wed, 25 Apr 2012 14:25:39 +0200 Subject: [PATCH] resolv file.open 'call a private method' --- lib/paperclipdropbox.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/paperclipdropbox.rb b/lib/paperclipdropbox.rb index 743eab9..1c55f43 100644 --- a/lib/paperclipdropbox.rb +++ b/lib/paperclipdropbox.rb @@ -43,8 +43,8 @@ def flush_writes #:nodoc: log("[paperclip] Writing files #{@queued_for_write.count}") @queued_for_write.each do |style, file| log("[paperclip] Writing files for ") if respond_to?(:log) - myfile = file.open - response = dropbox_client.put_file("/Public#{File.dirname(path(style))}/#{File.basename(path(style))}", myfile) + #myfile = file.open + response = dropbox_client.put_file("/Public#{File.dirname(path(style))}/#{File.basename(path(style))}", file.read) end @queued_for_write = {} end