From: Vasudevan C. <vco...@gm...> - 2017-01-06 14:06:30
|
Hi Ronald, Thanks for the reply. I tried creating multiple input type="file" within in a sample form. But the server side rejects that stating that it should have only one filename in the Multi-part. In my case, they are expecting one multi-part with body being text having its own content type and the other is a binary part. Looks like this type of multi-part creation through HTMLUnit is not possible. Let me know if there is any alternate way. Perhaps, I might have to use the HTTPClient interface for constructing the multi-part. Regards Vasu On 6 January 2017 at 19:17, Ronald Brill <rb...@rb...> wrote: > Hi Vasu, > > sorry for not responding, but i have some problems with the mailings lists > at the moment. > > As a quick guess i think you have to use the multiple option for your file > upload to be able to select many files (from the same folder) for upload. > Something like this... > > <input name="filesToUpload[]" id="filesToUpload" type="file" > multiple="" /> > > To support this from HtmlUnit the HtmlFileInput offers a setValueAttribute > method getting an array of file names. > Hope that helps... > > BTW Please use the latest snapshot build instead of the release; we did a > lot of fixes also for file upload during the last months. > > > RBRi > -------------------------- > WETATOR > Smart web application testing > http://www.wetator.org > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |