SheZii
1
I’m exporting a project from Unity3D for Android,
I’m trying to upload data to a WebService
In Unity3D, it’s working without any problems. Here’s my code.
IEnumerator CreatHuman_UploadData(string Base64)
{
WWWForm form = new WWWForm();
form.AddField("uid", guid);
form.AddField("file", Base64);
WWW www = new WWW(url, form);
yield return www;
if (www.error != null)
{
Debug.Log("Upload Error: " + www.error);
}
else
{
Debug.Log("Form upload complete!");
}
}
Blockquote
But when I Export Project for Android, it gives me an error.
It prints this Upload Error: 500 Internal Server Error
If I’m not wrong, there should be an Android-specific command for uploading the data for Android as the problem is only on Android, not in Unity3D. But I don’t seem to find that Android-specific method.
Thanks for your help.
PS: “guid” and “Base64” is a string
Hi.
As you can see you’ve a 500 error. This means that the server you’re pointing at has some trouble processing the data that you sent. So, can you perform a debug on backend? Maybe some of your strings are wrong and that leads to a 500 error. Or there’s some bug on backend and that’s why 500 happens.
Hope this helps!