Actually I think it's the same UploadBinaryData that you know (edit: it's your code actually :P), I made some modification to the class but I then get back to the "raw" version ^^
I managed to find where the applet is messing up thanks to some javascript. Here is my full code for the upload :
Code: DataUpload uploadHandler = new DataUpload();
if (!uploadImage(uploadHandler, dateNowString))
return;
if (!uploadText(uploadHandler, dateNowString))
return;
is_saved = true;
}
boolean uploadImage(DataUpload uploadHandler, String dateNowString)
{
boolean isUploadOk = false;
isUploadOk = uploadHandler.UploadImage(dateNowString + ".png", (BufferedImage) g.image);
return (isUploadOk);
}
boolean uploadText(DataUpload uploadHandler, String dateNowString)
{
boolean isUploadOk = false;
byte[] sendableFile = new byte[file_output.length()];
file_output.getBytes(0, file_output.length(), sendableFile, 0);
isUploadOk = uploadHandler.UploadBinaryData(dateNowString + ".txt", "", sendableFile);
return (isUploadOk);
}
So the applet messes at the UploadImage and UploadBinaryData functions. The isUploadOk boolean are at false at the end of each.
Whereas it works fine when running in Processing :x
I didn't figure out where in the DataUpload class it doesn't work but i think it's here :
Code: boolean isOK = StartPOSTRequest(fileName, imageMimeType);
if (!isOK)
return false;
And I really don't know why :/
Thx for your help ;)