lib/mongo_grid.rb in mongo_grid-0.2.8 vs lib/mongo_grid.rb in mongo_grid-0.2.9
- old
+ new
@@ -35,10 +35,9 @@
end
def uploadtogrid(upload,opts={})
filename=upload.original_filename
content_type=upload.content_type
- if content_type.include?("image")
if /jpg|jpeg|png/ =~ content_type
::Zbox::Qm.resize(upload.tempfile.path,opts)
end
data = File.open(upload.tempfile.path)
length=File.size(upload.tempfile.path)