From ebfc33b55619466549d2f46bd20ecacd692ba147 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Fri, 13 Dec 2024 09:36:51 +0800 Subject: [PATCH] DEV: Remove line of code that does not work (#30258) We can't delete the file from disk as some of the assets are still served by the app instead of going through the S3 bucket. It is a bug we need to fix but it also means this ENV is unsafe now. Just drop the env until we ensure all assets requested by the app are requested from the S3 bucket directly. --- lib/tasks/s3.rake | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/tasks/s3.rake b/lib/tasks/s3.rake index 1f5b6ddc383..2f2c262629d 100644 --- a/lib/tasks/s3.rake +++ b/lib/tasks/s3.rake @@ -40,8 +40,6 @@ def upload(path, remote_path, content_type, content_encoding = nil, logger:) File.open(path) { |file| helper.upload(file, remote_path, options) } end - - File.delete(path) if (File.exist?(path) && ENV["DELETE_ASSETS_AFTER_S3_UPLOAD"]) end def use_db_s3_config