Skip to content

Commit

Permalink
fix: dont retrieve from store until accessing file
Browse files Browse the repository at this point in the history
  • Loading branch information
Amnesthesia committed Sep 6, 2023
1 parent 8f58871 commit 2075b45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/carrierwave/uploader/store.rb
Expand Up @@ -125,7 +125,8 @@ def retrieve_from_store!(file_identifier)
with_callbacks(:retrieve_from_store, file_identifier) do
# We can't retrieve the file if we have no identifier
# to retrieve it with. Identifier should be assigned
# when setting up the uploader
# when setting up the uploader, or when caching,
# or storing a new file
next unless file_identifier
@file = storage.retrieve!(file_identifier)
@identifier = file_identifier
Expand Down

0 comments on commit 2075b45

Please sign in to comment.