I'm using http functions and classes to send some data to a remote server. If I use write() function with a string all works fine but when I use writeFromData() function to send an image, I get the error: Mosync 40001.
This is the source code:
void LoginScreen::initiateConnection(const char* url)
printf("\nconnecting to %s", url);
int res = mHttp.create(url, HTTP_POST);
if(res < 0)
printf("unable to connect - %i\n", res);
mIsConnected = true;
mHttp.setRequestHeader("Content-Type", "text/plain; charset=utf-8");
mHttp.writeFromData(SPLASH_NOLOGO, 0, maGetDataSize(SPLASH_NOLOGO));
SPLASH_NOLOGO is a png file inserted in resource file
I read that 40001 is a problem with resource file but the SPLASH_NOLOGO handle is correctly inserted because I use it as background image.
I also tried to send the image obtained after a snapshot (as in CameraDemo example) but the problem is the same.
There is a particular way to use writeFromData or in general to send images?
Thanks for your help and work