* #20466 file upload - first example test done * #20466 second test from FileUploadDirectivesExample passing in Java * #20466 FileUploadDirectives examples file rename plus docs * #20466 post-review changes - adding better JAVA Multipart API * #20466 Multipart Java conversions fix and added spec for the Java side of the model
22 lines
607 B
ReStructuredText
22 lines
607 B
ReStructuredText
.. _-fileUpload-java-:
|
|
|
|
fileUpload
|
|
==========
|
|
|
|
Description
|
|
-----------
|
|
Simple access to the stream of bytes for a file uploaded as a multipart form together with metadata
|
|
about the upload as extracted value.
|
|
|
|
If there is no field with the given name the request will be rejected, if there are multiple file parts
|
|
with the same name, the first one will be used and the subsequent ones ignored.
|
|
|
|
|
|
Example
|
|
-------
|
|
.. includecode2:: ../../../../code/docs/http/javadsl/server/directives/FileUploadDirectivesExamplesTest.java
|
|
:snippet: fileUpload
|
|
|
|
::
|
|
|
|
curl --form "csv=@uploadFile.txt" http://<host>:<port>
|