Shared network drive as Laravel 5.4 Storage

Viewed 3051

I have an image upload in my Laravel application and would like to have those images uploaded to shared network drive located on external Windows computer.

Is it somehow possible to mount a spesific folder at my shared network drive as Laravel Storage? Laravel 5.4's manual says that there is only s3 and Rackspace included as build-in drivers.

Thanks in advance.

2 Answers

I had a similar requirement and solved it by mounting the network share to a folder (or you could mount to a drive) in the local file system. There are plenty of guides on the net for doing this depending on your server operating system. You can then use the "local" file system driver to access the files.

Note that this means some sort of script on the server needs to handle connecting with the credentials required, rather than the laravel application, which may/may not be suitable in your environment.

Related