I would like to send a byte array with Android (loopj Async HTTP Client) to a webserver. The webserver should receive a byte array. Unfortunately when I try to output the data the output is empty. It works with strings, but not with a byte array. I used the code from the developer website to send the data.
On client side:
RequestParams params = new RequestParams();
params.put("field", byteArrayData);
On server side:
$array = $_POST["field"];
echo $array;
Can you help me to handle a byte array as input on the server side? Should I use $_REQUEST or something else than $_POST?
POST
your file in this manner, like abbiya said, encode your file to base64 then decode it in php and save it as you want.$_FILES
and then use php functionhttp://php.net/move_uploaded_file
to move to a directory on your server. There are a few clients that allow for file uploads as well.