Skip to content

Commit 8bf0286

Browse files
authored
add: image.write(local_photo_path)
1 parent 37da66e commit 8bf0286

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/models/spectrum.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def rotate
283283
photo.copy_to_local_file(:original,local_photo_path)
284284
image = Magick::ImageList.new(local_photo_path)
285285
image.rotate!(-90)
286-
image.write('public' + photo.url)
286+
image.write(local_photo_path)
287287
photo.reprocess!
288288
end
289289

@@ -292,7 +292,7 @@ def reverse
292292
photo.copy_to_local_file(:original,local_photo_path)
293293
image = Magick::ImageList.new(local_photo_path)
294294
image.flop!
295-
image.write('public' + photo.url)
295+
image.write(local_photo_path)
296296
self.reversed = !reversed
297297
photo.reprocess!
298298
end
@@ -639,4 +639,4 @@ def local_photo_path
639639
"/tmp/#{self.id}"
640640
end
641641

642-
end
642+
end

0 commit comments

Comments
 (0)