We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
val upload = post |> operation('download) |> formField[(FileInfo, Source[ByteString, Any])]('file) |> $$[String]
val download = get |> operation(Symbol("download")) |> $$[File]
fileUpload https://doc.akka.io/docs/akka-http/current/routing-dsl/directives/file-upload-directives/fileUpload.html
getFromFile https://doc.akka.io/docs/akka-http/current/routing-dsl/directives/file-and-resource-directives/getFromFile.html
The text was updated successfully, but these errors were encountered:
Swagger 3.0 specification for file upload https://swagger.io/docs/specification/describing-request-body/file-upload/
Swagger:
requestBody: content: multipart/form-data: schema: type: object properties: orderId: type: integer userId: type: integer fileName: type: string format: binary
Http Request:
POST /upload Host: example.com Content-Length: 2740 Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryWfPNVh4wuWBlyEyQ ------WebKitFormBoundaryWfPNVh4wuWBlyEyQ Content-Disposition: form-data; name="orderId" 1195 ------WebKitFormBoundaryWfPNVh4wuWBlyEyQ Content-Disposition: form-data; name="userId" 545 ------WebKitFormBoundaryWfPNVh4wuWBlyEyQ Content-Disposition: form-data; name="fileName"; filename="attachment.txt" Content-Type: text/plain [file content goes there] ------WebKitFormBoundaryWfPNVh4wuWBlyEyQ
requestBody: content: multipart/form-data: schema: type: object properties: filename: type: array items: type: string format: binary
POST /upload Host: example.com Content-Length: 2740 Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryWfPNVh4wuWBlyEyQ ------WebKitFormBoundaryWfPNVh4wuWBlyEyQ Content-Disposition: form-data; name="fileName"; filename="file1.txt" Content-Type: text/plain [file content goes there] ------WebKitFormBoundaryWfPNVh4wuWBlyEyQ Content-Disposition: form-data; name="fileName"; filename="file2.png" Content-Type: image/png [file content goes there] ------WebKitFormBoundaryWfPNVh4wuWBlyEyQ Content-Disposition: form-data; name="fileName"; filename="file3.jpg" Content-Type: image/jpeg [file content goes there] ------WebKitFormBoundaryWfPNVh4wuWBlyEyQ
Sorry, something went wrong.
No branches or pull requests
EXAMPLE:
AKKA HTTP DOCUMENTATION:
fileUpload
https://doc.akka.io/docs/akka-http/current/routing-dsl/directives/file-upload-directives/fileUpload.html
getFromFile
https://doc.akka.io/docs/akka-http/current/routing-dsl/directives/file-and-resource-directives/getFromFile.html
The text was updated successfully, but these errors were encountered: