advanced-nova-media-library
advanced-nova-media-library copied to clipboard
Permissions and Encryption
Hello,
First of all thank you for this great package! I have a requirement to ensure that my files remain private and can only be accessed by logged-in users with the necessary permissions to edit the associated model.
To achieve this, I've set up a private disk configuration in filesystems.php
as follows:
'private' => [
'driver' => 'local',
'root' => storage_path('app/private'),
'visibility' => 'private',
'throw' => true,
],
With this in place, files are successfully uploaded to the private disk. I have two specific questions:
- Encryption: How can I encrypt the files during the upload process?
-
Access Control: I need to ensure that before downloading or viewing, a user has the required permissions to edit the associated model (and if so, decrypt the file before download). I believe I might need to override the
show
method inDownloadMediaController
.
Could you guide me on the best approach for this? Thank you in advance!
same problem here... I can download the image from Nova but I can't see the preview.
Same problem here