U
U
ueuxwqtb2019-12-11 21:50:55
Data storage
ueuxwqtb, 2019-12-11 21:50:55

How to teach Laravel to distinguish between S3 and local links?

Since inception, data has been stored locally through Laravel's local driver. Now you need to move to S3, the amount of data is large in order to move there in one fell swoop. How can I teach Laravel that all new data is loaded on s3, but the links of old local files do not break? That is, I just change the driver to c3 in the config and that's it? We get all links to files through Storage::url()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vism, 2019-12-11
@vism

load new ones on S3
When receiving, check if the file is in C3, if not, then take it from LAN.
I did.
Another option is the flag in the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question