@m615 in this series https://laracasts.com/series/multitenancy-in-practice, Kevin is showing you how to allow public and private access to your s3 buckets. I think that you will need to setup the permissions on the Amazon side, nothing to do with Nova. You will just define two separate storage drivers, and use each one as you need.
How do I set S3 public access on a file upload using Nova
I'm creating a MediaAsset model so that users of the Nova admin can attach images, 3d assets, pdfs, and whatever else they would like to a Product model.
I have my application set up so that Nova can upload to S3 and that works fine. What I can't figure out how to do is make sure that once the file is uploaded to S3 I need to set access to the file to the public so my Single Page app can pull in the asset and display things like image files or if it's a PDF the user will need to be able to click and download the file directly from S3.
By default, all these files are set to private when uploaded.
Here is what my fields section looks like in my Resource for MediaAsset model.
return [
ID::make('id')->sortable()->hideFromDetail(),
File::make('Media Asset', 'url')
->disk('s3')->prunable()
->storeOriginalName('filename')
->path('asset')->hideFromDetail(),
Text::make('File Name', 'filename')->showOnDetail()->hideWhenCreating()->hideWhenUpdating(),
Text::make('URL', 'url')->showOnDetail()->hideWhenCreating()->hideWhenUpdating(),
BelongsTo::make('Product'),
];
Please or to participate in this conversation.