Save normalized source with post instead of original source.

Fixes #2294.
This commit is contained in:
evazion
2014-10-28 21:58:08 -05:00
parent 9f96965bb4
commit ffc7a7bb39

View File

@@ -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