From abd492bbe2701d62d6c5d8a173ccd7f26de43a69 Mon Sep 17 00:00:00 2001 From: imsujinpark Date: Tue, 14 Nov 2023 10:46:13 +0900 Subject: [PATCH 1/2] Remove error condition for file state "attached_temporary" --- app/controllers/files_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 4e35b21b349ea..d5e96f055a875 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -1140,7 +1140,7 @@ def api_create_success return unless quota_exempt? || check_quota_after_attachment if Attachment.s3_storage? - return head(:bad_request) unless @attachment.state == :unattached + return head(:bad_request) unless [:attached, :attached_temporary].include?(@attachment.state) details = @attachment.s3object.data @attachment.process_s3_details!(details) From f0855a49a858efa04173cfe64e25b9dd23a81846 Mon Sep 17 00:00:00 2001 From: imsujinpark Date: Wed, 15 Nov 2023 15:46:34 +0900 Subject: [PATCH 2/2] fixed typos --- app/controllers/files_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index d5e96f055a875..5c7c281565d9e 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -1140,7 +1140,7 @@ def api_create_success return unless quota_exempt? || check_quota_after_attachment if Attachment.s3_storage? - return head(:bad_request) unless [:attached, :attached_temporary].include?(@attachment.state) + return head(:bad_request) unless [:unattached, :unattached_temporary].include?(@attachment.state) details = @attachment.s3object.data @attachment.process_s3_details!(details)