soarecostin / file-vault

A Laravel package for encrypting and decrypting files of any size
MIT License
185 stars 62 forks source link

Fix #10 streamDecrypt ignoring custom S3 disk #15

Open greimers opened 3 years ago

greimers commented 3 years ago

This fixes the hardcoded S3 disk name. Before, if you had a custom S3 disk with a name different than "s3", the isS3File function would always return false resulting in errors.

This PR changes the isS3File function to check the class type of the adapter instead of the disk name. This also removes a caching step in order to make sure the adapter is always set correctly.

Closes #10