« Return to Thread: A problem with array parameter in form

A problem with array parameter in form

by tommmmmm :: Rate this Message:

| View in Thread

There is a form, that contains an array parameter:
<input id="T7" maxlength="5" name="file[]" type="file">


And I tried setting it with:
        FileBody bin = new FileBody(fileToUpload);
        reqEntity.addPart("file[]", bin); // in case of failure try file or
file[] or file%5B%5D
        httpPost.setEntity(reqEntity);


I tried all 3 possible solutions, that means file file[] and file%5B%5D
Only 2nd didn't produce server sided errors, however 2 out of 3 give
following responseBody:
no files

I set the HttpClient's logging to debugging mode to see it all from within
- the file is actually being sent.

I tried google the error, but nothing good came out either.

Any help appreciated.


--
Tomasz P.

 « Return to Thread: A problem with array parameter in form