drogonframework / drogonframework/drogon
Upload path comment does not stand
- Dominant language
- C++
- Stars
- 14.3k
- Forks
- 1.4k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 14
Description
**Describe the bug**
In [config.example.json](https://github.com/drogonframework/drogon/blob/88d06684f26ba2b2ac95d9c5f97af3d2aae8b7f5/config.example.json#L134) it is stated:
> upload_path: The path to save the uploaded file. "uploads" by default.
If the path isn't prefixed with /, ./ or ../,
it is relative path of document_root path
However, if I setup a project where I put a relative path to the running context for both `document_root` and `upload_path`:
```json
"document_root": "./frontend",
"upload_path": "./confidential/database/uploads"
```
Drogon creates the `uploads` folder within the `document_root` path, `./frontend/confidential/database/uploads`. This contradicts with the statement written as a comment in the example.
**Expected behavior**
Pages should be served in `./frontend`, and uploads should be uploaded to `./confidential/database/uploads`.
**Desktop (please complete the following information):**
- OS: Ubuntu
**Additional context**
Currently it's possible to achieve the desired result with either `/home/user/project/confidential/database/uploads` or `../confidential/database/uploads`.
Contributor guide
Assessment
This issue has not been assessed yet.