diff --git a/app/models/upload.rb b/app/models/upload.rb index 9fa7341ce..7ef99d3a2 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -269,7 +269,7 @@ class Upload < ActiveRecord::Base File.open(path) do |f| upload.url = Discourse.store.store_upload(f, upload) upload.filesize = f.size - upload.save + upload.save! end # remap the URLs DbHelper.remap(UrlHelper.absolute(previous_url), upload.url) unless external