mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 18:27:19 +08:00
Print error messages on why upload fails to save.
This commit is contained in:
@ -787,7 +787,11 @@ def recover_from_s3_by_sha1(post:, sha1:, object_keys: [])
|
|||||||
File.basename(key)
|
File.basename(key)
|
||||||
).create_for(post.user_id)
|
).create_for(post.user_id)
|
||||||
|
|
||||||
post.rebake! if upload.persisted?
|
if upload.persisted?
|
||||||
|
post.rebake!
|
||||||
|
else
|
||||||
|
puts "#{post.full_url}\n#{upload.errors.full_messages.join("\n")}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
tmp&.close
|
tmp&.close
|
||||||
|
Reference in New Issue
Block a user