mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 21:33:40 +08:00
DEV: Do not delete failed uploads from S3 in debug mode (#14143)
See also 58e9fffe4c
This commit is contained in:
parent
d2fe46d476
commit
a7ec1a86b5
|
@ -84,12 +84,11 @@ class ExternalUploadManager
|
||||||
external_upload_stub.created_by_id
|
external_upload_stub.created_by_id
|
||||||
)
|
)
|
||||||
rescue
|
rescue
|
||||||
# We don't need to do anything special to abort multipart uploads here,
|
|
||||||
# because at this point (calling promote_to_upload!), the multipart
|
|
||||||
# upload would already be complete.
|
|
||||||
Discourse.store.delete_file(external_upload_stub.key)
|
|
||||||
|
|
||||||
if !SiteSetting.enable_upload_debug_mode
|
if !SiteSetting.enable_upload_debug_mode
|
||||||
|
# We don't need to do anything special to abort multipart uploads here,
|
||||||
|
# because at this point (calling promote_to_upload!), the multipart
|
||||||
|
# upload would already be complete.
|
||||||
|
Discourse.store.delete_file(external_upload_stub.key)
|
||||||
external_upload_stub.destroy!
|
external_upload_stub.destroy!
|
||||||
else
|
else
|
||||||
external_upload_stub.update(status: ExternalUploadStub.statuses[:failed])
|
external_upload_stub.update(status: ExternalUploadStub.statuses[:failed])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user