Web client - sending multiform post with in memory byte array

185 views
Skip to first unread message

Nilesh Barai

unread,
Aug 19, 2020, 1:46:46 AM8/19/20
to vert.x
Using Vertx Web Client, while sending multipart form post request [file upload] one needs to provide file path.

Example: 

MultipartForm form = MultipartForm.create() 
 .attribute("imageDescription", "a very nice image") 
 .binaryFileUpload("imageFile", "image.jpg", "/path/to/image", "image/jpeg");  

This feature requires the file to be present on file system [needs IO operation]. 

Can Vertx team provide a overload of binaryFileUpload method in which one can pass a byte array (represents file)? Just to use this feature we need to integrate Apache HTTP client in our project. Please consider this as a feature request. 

Thomas SEGISMONT

unread,
Aug 19, 2020, 4:53:30 AM8/19/20
to vert.x
There's an issue already for this: https://github.com/vert-x3/vertx-web/issues/1344

Would you like to contribute the feature? We can assist you in the process

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/8cf89a08-d79f-403f-99ba-8b960223e58bn%40googlegroups.com.

Julien Viet

unread,
Aug 19, 2020, 5:29:45 AM8/19/20
to vert.x
Actually I implemented it as quick win today :-)

Julien

Reply all
Reply to author
Forward
0 new messages