Skip to content

Commit 7d40baa

Browse files
committed
[fix] Only use S3 storage when AWS_ACCESS_KEY_ID is present
1 parent 5ed77b0 commit 7d40baa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/environments/production.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
4040

4141
# Store uploaded files on the local file system (see config/storage.yml for options)
42-
config.active_storage.service = :amazon
42+
config.active_storage.service = ENV['AWS_ACCESS_KEY_ID'].present? ? :amazon : :local
4343

4444
# Mount Action Cable outside main process or domain
4545
# config.action_cable.mount_path = nil

0 commit comments

Comments
 (0)