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
No description provided.
The text was updated successfully, but these errors were encountered:
How could I upload file with rest.vertx?
Sorry, something went wrong.
For the top of my head ... best way would be to bind a POST request and then use the @context RoutingContext to get file uploads ...
Something like this:
@POST("upload") public String fileUpload(@Context RoutingContext context) { Set<FileUpload> fileUploadSet = routingContext.fileUploads(); Iterator<FileUpload> fileUploadIterator = fileUploadSet.iterator(); while (fileUploadIterator.hasNext()){ FileUpload fileUpload = fileUploadIterator.next(); // To get the uploaded file do Buffer uploadedFile = vertx.fileSystem().readFileBlocking(fileUpload.uploadedFileName()); ... }
probably you will need to set the correct content type ...
Ok, thanks, It is helpful.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: