Add standard interface for handling file uploads in the Dioptra client #708
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.
Addresses client-side solution for #694
Added requests-toolbelt as a new project dependency to support streaming of multi-file uploads.
This branch does not include any new unit tests for this new functionality, as it will start being exercised via the REST API integration tests once we integrate the solutions for #694 with #658. However, in the interest of verifying this new feature for the client works, I created this branch, https://github.com/usnistgov/dioptra/tree/test-client-uploading-support, that adds a simple
/echoes
endpoint that allows you to upload files, and the server echoes back the name and size of the files you upload. I tested it locally and I also created two simple REST API integration tests based on this endpoint to validate the test client implementation. Both seem to be working as expected.Todos
DioptraFile
objects for upload. The filenames will retain relative filepaths with respect to the source directory's root path, and be standardized in the POSIX format.DioptraFile
object/list ofDioptraFile
objects to upload. The filenames will be stripped of any directory paths.