Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Document Static Middleware #371

Open
McSneaky opened this issue Aug 25, 2019 · 4 comments · May be fixed by #372
Open

Document Static Middleware #371

McSneaky opened this issue Aug 25, 2019 · 4 comments · May be fixed by #372
Assignees

Comments

@McSneaky
Copy link

Currently 'Adonis/Middleware/Static', is documented only under middelware section of documentation. https://adonisjs.com/docs/4.1/middleware#_server_middleware

I think it should be also noted under file uploads or file storage sections.

It is really inconvenient and little bit illogical that you need to read through middleware section of documentation too if you want to receive files from public folder.
In middleware part of documentation it is only mentioned once in example, but there is nothing to explain this line / middleware

I can fill in PR if anyone has ideas where it should be documented. I'm not sure myself, if it should be somewhere under file uploads or file storage 🤔

@thetutlage
Copy link
Member

I don't think, this should really go under file uploads, since I do not recommend uploading files to public folder directly.

I believe having a new document that talks about public files and mentioning the middleware there is a good choice. What you think?

@McSneaky
Copy link
Author

I'd also like to +1 Romains point (in Discord), that should suggest using CDN / proxy like Nginx etc to serve static files somewhere in documentation.

I believe having a new document that talks about public files and mentioning the middleware there is a good choice. What you think?

Seems like good idea 👍

@thetutlage
Copy link
Member

Yup, happy to recommend that. Mind doing a PR with the initial doc?

@McSneaky
Copy link
Author

Sure, will file it in after work

@McSneaky McSneaky linked a pull request Aug 27, 2019 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants