You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional tips if you're using multi-tenancy and don't want to use the Storage facade, This will take the file upload (/tmp/12345) and encrypt the contents into a temporary file for the request (/tmp/abcdef), then upload it afterwards.
use SoareCostin\FileVault\FileEncrypter;
use Illuminate\Support\Str;
use \Storage;
$save_as = (string)Str::uuid() . '.' . strtolower($this->request->file('blob')->getClientOriginalExtension()); // my_photo.JPEG
$temporary = tmpfile();
$encrypter = new FileEncrypter (config('file-vault.key'), config('file-vault.cipher'));
$encrypter->encrypt ($this->request->file('blob')->path(), stream_get_meta_data($temporary)['uri']);
Storage::disk ($this->disk)->put ($this->folder_prefix.'/'.$save_as, stream_get_meta_data($temporary)['uri']);
It working in my case.
The text was updated successfully, but these errors were encountered: