file-vault icon indicating copy to clipboard operation
file-vault copied to clipboard

Error while encryting a file to s3

Open UsamaKhan-hub opened this issue 2 years ago • 0 comments

Hello, what i am doing is basically i am uploading files on s3 as encrypted , it's working fine but when i tried to decrypt any specific file and create a presignedUrl (which i get and is accessible) and then i created a job to run after a while to again encrypt that specific file , jobs gets failed and it throws me this error : Error: Call to undefined method League\Flysystem\Adapter\Local::getClient() in /vendor/soarecostin/file-vault/src/FileVault.php:192 Stack trace:

Sometime it works but most of time not. If someones guide me regarding this. My code is as follow : To create a url : $presignedUrl=$client->getAwsTemporaryUrl($client->getDriver()->getAdapter(), $key, now()->addSeconds(15), []);

To decrypt the file again : EncryptAttachment::dispatch($key1) ->onQueue('queue4') ->delay(now()->addSeconds(15)); and also i am specifying my disk as well in that job as well FileVault::disk('s3')->encrypt($this->key);

UsamaKhan-hub avatar Feb 28 '23 23:02 UsamaKhan-hub