ahmedkandel / nova-s3-multipart-upload

A Laravel Nova resource tool to upload files directly to Amazon S3. You can (upload | download | delete) single, multiple, small or big files.
MIT License
22 stars 22 forks source link

New function: View file in browser or download it #2

Closed andresilvagomez closed 3 years ago

andresilvagomez commented 3 years ago

I wana to create a funtion like to this capture

Captura de Pantalla 2020-12-03 a la(s) 11 06 26 p  m

what do you think is the best way to implement it?

maybe something like

->onlyView() ->onlyDownload() <- this is the default maybe don't be appear ->viewAndDownload()

ahmedkandel commented 3 years ago

I think it is better to name it ->contentDisposition() which will accept $type as a parameter with values either inline for view in browser or attachment for download.

I don't think having both view and download actions have sense but you can achieve this by passing the $type value as both.

For sure this function needs implementation so PRs are welcome.

andresilvagomez commented 3 years ago

Here the PR => https://github.com/ahmedkandel/nova-s3-multipart-upload/pull/3

ahmedkandel commented 3 years ago

Thanks to @andresilvagomez Closed by #3