DEV: Allow removing local assets after s3 sync (#14013)

This commit is contained in:
Rafael dos Santos Silva 2021-08-12 14:20:05 -03:00 committed by GitHub
parent 1656b7ed01
commit b2e4c91818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,8 @@ def upload(path, remote_path, content_type, content_encoding = nil)
helper.upload(file, remote_path, options) helper.upload(file, remote_path, options)
end end
end end
File.delete(path) if (File.exists?(path) && ENV["DELETE_ASSETS_AFTER_S3_UPLOAD"])
end end
def use_db_s3_config def use_db_s3_config