I am trying to build a file management system in Laravel based on league/flysystem: https://github.com/thephpleague/flysystem
I am using the S3 adapter and I have it working to save the uploaded files using:
Now I am stuck on generating the download file URL when using the S3 adapter.
The files are saved correctly in the S3 bucket, I have permissions to access them, I just don't know how to get to the S3 getObjectUrl method through the league/flysystem package.
I have tried:
$contents = $filesystem->read('filename.txt');
but that returns the content of the file.
$contents = $filemanager->listContents();
$paths = $filemanager->listPaths();
but they give me the relative paths to my files.
What I need is something like "ht...//[s3-region].amazonaws.com/[bucket]/[dir]/[file]..."