Permalink
Browse files

More fixes

  • Loading branch information...
Daniel Tenner
Daniel Tenner committed Mar 15, 2009
1 parent 745ff8a commit 4898a3a8855aae7b440842ea862bd9bfe9ed42f5
Showing with 2 additions and 1 deletion.
  1. +1 −1 lib/num_fu.rb
  2. +1 −0 lib/num_fu/upload_extractor.rb
View
@@ -107,7 +107,7 @@ def set_size_from_temp_path
end
class FakeUploadData
- attr_accessor :filename, :content_type, :path, :original_filename
+ attr_accessor :filename, :content_type, :path, :original_filename, :size
end
end
@@ -9,6 +9,7 @@ def extract_upload(name="file")
fake_upload_data.path = params["#{name}"]["uploaded_data"][".path"]
fake_upload_data.original_filename = params["#{name}"]["uploaded_data"][".name"]
fake_upload_data.content_type = params["#{name}"]["uploaded_data"][".content_type"]
+ fake_upload_data.size = File.size(fake_upload_data.path)
params["#{name}"]["uploaded_data"] = fake_upload_data
end
end

0 comments on commit 4898a3a

Please sign in to comment.