Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
andresilvagomez opened this issue Dec 4, 2020 · 3 comments
Closed

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

andresilvagomez opened this issue Dec 4, 2020 · 3 comments
Labels
done This is ok now enhancement New feature or request

Comments

@andresilvagomez
Copy link
Contributor

andresilvagomez commented Dec 4, 2020

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
Copy link
Owner

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.

@ahmedkandel ahmedkandel added the enhancement New feature or request label Dec 4, 2020
@andresilvagomez
Copy link
Contributor Author

andresilvagomez commented Dec 4, 2020

Here the PR => #3

@ahmedkandel ahmedkandel changed the title New function New function: View file in browser or download it Dec 6, 2020
@ahmedkandel
Copy link
Owner

Thanks to @andresilvagomez Closed by #3

@ahmedkandel ahmedkandel added the done This is ok now label Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done This is ok now enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants