A platform for community discussion. Free, open, simple.
Print error messages on why upload fails to save.
Guo Xiang Tan68572b8afc90
diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rakeindex 19473582c6f..b13b9f16b0c 100644--- a/lib/tasks/uploads.rake+++ b/lib/tasks/uploads.rake@@ -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")}"+ endendensuretmp&.close