I have a problem. My main web-server has not enough space to store user-avatars and so on... so I must use a ftp-storage to store my pictures. The upload of this pictures works perfectly, but I don´t know how I can bring them back to the user?
Is there a special function of laravel where I can get the image and display it in the browser of my client?
It would be nice if you have a idea and how I can handle this problem!
Thanks for your attention!
Best regards,
Robert
The best solution would be to use a S3 bucket to store them on or something. That solves your storage problem, and you can easily upload them and display them to the user like normal using the link to the s3 bucket.
With your ftp setup, it might be possible. But the location of the files must have adequate file permissions for laravel to read them. Usually files uploaded via ftp are owned by the ftp user, which probably isn't the same as the user laravel is running under.
Really, S3 is best for this sort of thing. Another benefit is they are already backed up in S3. So if something happens to your server, you still have all of the images.