-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[6.x] Add support for Storage::url() for the Ftp driver #31258
Conversation
Hmm. I'm 👎 here. I don't think we need this in the framework core. I have a package that lets you get at all of the flysystem drivers if you need it (it actually predates flysystem being in the laravel core). |
This technique is already used with the |
I know. That's what I mean by "in the core". |
I think you missed this part 😄
|
Definitely not. I know how the laravel flysystem stuff works! |
@GrahamCampbell Do you really think it's a good think to allow people to upload a file via ftp and then tell them that they need to download some package just to be able to generate urls ? |
Currently it's not possible to generate an url for files that are stored on a
ftp
disk using theStorage::url()
This PR allows to generate an url by adding a
url
key in the configuration of the disk the same waylocal
ands3
do.Motiviation
I have an application that is running in production for years since laravel 5.2 and i'm using the local driver to store files on the server. This app has taken a lot of space and i need to move the files to a remote ftp server.
Adding support for url generation with
Storage::url()
for theftp
driver will allow me to keep my code as is and not change a single line of code.I just need to move the files to the new ftp server and everything will work the same, i don't even need to update the database since i'm storing only relative paths in the db.
Other then my use case this will allow to be consistent and allow for url generation using the
Storage::url()
no matter what driver the developper is using.