If you have a configured disk to your some.remote.location, then you are unlikely to need this part of the url in the file name.
Suppose your disk URL is
https://some.remote.location/development/verification/
then you are trying to load a file from
I am using this package to upload / encrypt / store uploaded images.
https://github.com/soarecostin/file-vault
Basically user uploads 3 images required which get encrypted into a private folder. That is working fine.
Now admin needs to review these images. So I do not want to download in the browser with the streamDownload function. I do not see any options and looked / googled / on how to simply get that encrypted image, decrypt it and i assume make a base_64 string and return that to the front-end with my API json response.
So question is how can i view these uploaded images?
Using league/flysystem-aws-s3-v3 so I can upload the images right now no problem. They are encrypted, but when i try to get the image:
$file = 'https://some.remote.location/development/verification/3729828c-4d69-11ec-866b-7f65ebec3fd0/0611fdf9-70e4-4b3f-b33c-bc430fa6d48c.jpg.enc';
if (!Storage::disk('spaces')->has($file)) {
return 'File not found'; // never found yet typed into browser directly forces browser to download the .enc file so its there
}
$image = Storage::disk('spaces')->get($file);
Step I assume => get this file content => decrypt it => remove .enc extension => base_64 encode => set that as the data to return to API response?
I just can not seem to get the first step of getting the file from the spaces folder
Anyone have any ideas?
Thanks again everyone
Please or to participate in this conversation.