From ffc7a7bb39251e660a8b41fd12a2d1943ff45837 Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 28 Oct 2014 21:58:08 -0500 Subject: [PATCH] Save normalized source with post instead of original source. Fixes #2294. --- app/models/upload.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/upload.rb b/app/models/upload.rb index ca04eb075..238ee71c1 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -91,7 +91,7 @@ class Upload < ActiveRecord::Base CurrentUser.scoped(uploader, uploader_ip_addr) do update_attribute(:status, "processing") if is_downloadable? - download_from_source(temp_file_path) + self.source = download_from_source(temp_file_path) end validate_file_exists self.content_type = file_header_to_content_type(file_path) @@ -366,6 +366,7 @@ class Upload < ActiveRecord::Base download = Downloads::File.new(source, destination_path) download.download! ugoira_service.load(download.data) + download.source end end