-
Notifications
You must be signed in to change notification settings - Fork 191
Add options to store files directly to the file system and to omit duplicating files in memory #257
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
5f22dfd
Add options to store files directly to the file system and to omit du…
ctomahogh 916610a
Delete accidentially added newline in http_resource.hpp
ctomahogh d9adfcb
Removed unused function, fixed some code style and typos in comments
ctomahogh 220fdd8
Removed asprintf in favor or string concatenation
ctomahogh 52cb06f
Made http_utils::generate_random_upload_filename plattform independant
ctomahogh 71d1f20
Input and output of http_utils::generate_random_upload_filename are c…
ctomahogh 1f37cfa
Added options and functions for file upload to README.md
ctomahogh fac086a
Use correct include and functions in generate_random_upload_filename …
ctomahogh 5843f5f
Add missing includes for windows, fixed wrong argument for _mktemp_s
ctomahogh bc5a4fe
Removed accidentially pushed debug code
ctomahogh 8d7ea8e
Use a static const char* for the random file system template
ctomahogh 329c066
Make output of get_or_create_file_info const and introduce new setters
ctomahogh 07e9f4d
Use const variables for the webserver options
ctomahogh 29ba743
Added an example for file upload
ctomahogh 2606d61
Use a prefixed operator in for loop
ctomahogh 8ab2972
Added safety check for use of strlen and some missing free()s
ctomahogh 3880d8d
Changed file map to be a map of keys with a nested map of files
ctomahogh 2e99b1d
Adjusted file_upload example to use new files map
ctomahogh fd7bab9
Updated description of files map in README.md
ctomahogh ccc67e8
Removed strlen from generate_random_upload_filename
ctomahogh 799c201
Use a pointer to std::ofstream in modded_request
ctomahogh f329061
Moved struct file_info_s to class file_info
ctomahogh 8b5c172
Setters of class file_info are private and class webserver is a frien…
ctomahogh cb802d1
Use const reference as parameter for set_file_system_file_name
ctomahogh c6151c4
Don't create zero length files if no file is uploaded
ctomahogh 4cb49c8
Updated README.md as file_info is now a class
ctomahogh 7f2c353
Some code styling and small refactorings after review
ctomahogh 27fc9a8
Replaced std::exception with custom generateFilenameException
ctomahogh 1cf683e
Some more comments and code style fixes after review
ctomahogh 88d14aa
Some more code style changes after review
ctomahogh b3a39dd
Added error string to generateFilenameException
ctomahogh cbca260
Added comment for c functions in generate_random_upload_filename
ctomahogh f896540
Removed const qualifier from file_info::get_file_size()
ctomahogh 897eab9
Merge branch 'etr:master' into upload_to_file_system
ctomahogh 7b73c48
Added unit test for generate_random_upload_filename
ctomahogh 4f2cecf
Removed filesystem include from unit tests again, as it would require…
ctomahogh c1878f5
Close open upload file after post processor is done
ctomahogh f189014
Added content_type and transfer_encoding to file_info
ctomahogh 8e16406
Fixed file_upload example
ctomahogh 4bcc846
Made filename_template and path_separator part of class http_utils
ctomahogh f4fb34f
Added integration test for file upload
ctomahogh 0e90742
Fixed integration test for file upload
ctomahogh ee91ea9
Merge branch 'etr:master' into upload_to_file_system
ctomahogh ac91c63
Removed empty AUTO_TEST from file_upload integration test
ctomahogh f13d1fe
Use internal values for http_ressource class in integration tests
ctomahogh 91b90e5
Added further integration tests for file upload
ctomahogh 4de82c9
Added test_content_2 to configure script
ctomahogh acebdfa
Fixed memory leak in post_iterator
ctomahogh 6fff5f0
Some code style fixed on file upload integration test
ctomahogh dbba47c
Use map definition instead of auto in integration test
ctomahogh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use internal values for http_ressource class in integration tests
Avoid using pointers in class print_file_upload_resource in favour of internal values and according getter functions. Additionally simplified the code by wrapping lines and using the auto keyword instead of long map specifiers.
- Loading branch information
commit f13d1fe0b098809061e4612ae8e18a28a42bb4fc
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: let's avoid
autoin this context - it makes it harder to understand the type used (same for all the others in this code).