Skip to content

signed url for a s3 file that will return to api response #28

@UsamaKhan-hub

Description

@UsamaKhan-hub

Trying to upload enc files on s3 and retrieving them to create a signed url for the response to an API to access them from s3.
What i have achieved so far is :

Files are being uploaded to s3 as (.enc) even if i use streamDownload and decrypt file , saves it, it's working perfectly.

1- I am trying to get a singed url for a file that will return to api response , which is i am getting correctly using :
$command = $client->getCommand('GetObject', [ 'Bucket' => $bucket, 'Key' => **FileVault::disk('s3')->decrypt($key),** ]); $request = $client->createPresignedRequest($command, '+20 minutes'); $presignedUrl = (string)$request->getUri();
It is working fine if i put path of a normal file to key but when i try to decrypt it as well it says :

"message": "Found 1 error while validating the input provided for the GetObject operation:\n[Key] must be a string or an object that implements __toString(). Found object(SoareCostin\FileVault\FileVault)",

If you could guide me @soarecostin . Bundle of thanks already for this wonderful package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions