support sub-directory in the image folder #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have the main branch using a simple photo folder: it have 13 .jpeg files in ./ and 13 .jpeg in ./2015_12 folder:
.
├── 2015_12
│ ├── 20151201_IMG_4403.JPG
│...
│ └── 20151231_IMG_4435.JPG
├── DSC01938.JPG
...
├── DSC01943.JPG;
the start_web.py return 404 for all files in ./2015_12 folder as it direct join image directory and filename, omit the relative path.
get_file_path_from_db(filename) use input filename and compare with info in the database and return absolute full file path.
WARNING: This may slow down the process when database is rather large!