advanced-nova-media-library icon indicating copy to clipboard operation
advanced-nova-media-library copied to clipboard

Permissions and Encryption

Open Paulsky opened this issue 1 year ago • 2 comments

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:

  1. Encryption: How can I encrypt the files during the upload process?
  2. 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 in DownloadMediaController.

Could you guide me on the best approach for this? Thank you in advance!

Paulsky avatar Nov 03 '23 14:11 Paulsky

same problem here... I can download the image from Nova but I can't see the preview.

francescosganga avatar Jan 16 '24 18:01 francescosganga

Same problem here

FrancoFourmantin avatar Jul 25 '24 20:07 FrancoFourmantin