Skip to content

Commit 2075b45

Browse files
committed
fix: dont retrieve from store until accessing file
1 parent 8f58871 commit 2075b45

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/carrierwave/uploader/store.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ def retrieve_from_store!(file_identifier)
125125
with_callbacks(:retrieve_from_store, file_identifier) do
126126
# We can't retrieve the file if we have no identifier
127127
# to retrieve it with. Identifier should be assigned
128-
# when setting up the uploader
128+
# when setting up the uploader, or when caching,
129+
# or storing a new file
129130
next unless file_identifier
130131
@file = storage.retrieve!(file_identifier)
131132
@identifier = file_identifier

0 commit comments

Comments
 (0)