drogonframework / drogonframework/drogon
Filters are not called on uploads folder
- Dominant language
- C++
- Stars
- 14.3k
- Forks
- 1.4k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 15
Description
**Describe the bug**
Applying a filter on `"/uploads"` folder, does not get called.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a sample filter with a `std::cout` inside.
2. Make sure the uploads folder is set in `config.json`.
3. Add a `"locations"` config entry:
```json
{
"uri_prefix": "/uploads",
"filters": [ "YourFilter" ]
}
```
4. In the HTML file, add an `` tag.
5. Set the image's src to a file or a random name within the uploads folder. (e.g. `src="/uploads/random.png"`)
6. Run the application, no output will be observed when opening the HTML file page.
**Expected behavior**
The filter should get called.
**Desktop (please complete the following information):**
- OS: Ubuntu
- Browser: Google Chrome
**Additional context**
Alternatively, we could do this with Sync AOP, but we would have to always check for the path.
Contributor guide
Assessment
This issue has not been assessed yet.