mirror of
https://github.com/discourse/discourse.git
synced 2025-04-15 17:00:56 +08:00
Print error messages on why upload fails to save.
This commit is contained in:
parent
8c374f339c
commit
68572b8afc
@ -787,7 +787,11 @@ def recover_from_s3_by_sha1(post:, sha1:, object_keys: [])
|
||||
File.basename(key)
|
||||
).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
|
||||
ensure
|
||||
tmp&.close
|
||||
|
Loading…
x
Reference in New Issue
Block a user