Can't Get the file which was uploaded using UploadService in Unity3D.

0 votes

Hi,

 

             In Unity,  I uploaded the .XML fie using the Upload Service.

UploadService uploadService = App42API.BuildUploadService(); 

uploadService.UploadFile(fileName, filePath, fileType, description, new UnityCallBack());  

But when I try to get the files which are uploaded using: 

UploadService.GetFileByName(filename, new UnityCallBack);

It didn't even give any Response/Errors.

If i try to find the filename which does not exist in the Cloud means, it throws an excpetion of "Particular filename doesn't exist".

 

asked Apr 26, 2014 in App42 Cloud API-BaaS by raj (21 points)

1 Answer

0 votes

Hi raj,

Thanks for connecting with us.

Please tell us which Unity SDK version you are using. Because this is working fine in our side.

Have your correctly confihure your UnityCallback. somethink like this.

 public void OnSuccess(object upload)

{
  if (upload is Upload)
  {
    Debug.Log("Upload Responce is: " + upload);
  }
}
 
public void OnException(Exception e)
{
Debug.Log ("Exception : " + e);
}
 
If you have still faced some problem, please set App42 debug mode on like this and send me editor logs.
 
App42Log.SetDebug(true);
answered Apr 27, 2014 by sshukla480 (407 points)
Works Fine.  . .
Last time when I tried things like uploadService.UploadFile and uploadService.GetFileByName, they were not working in Unity webplayer because forbidden apis were used internally in app42 sdk. Is there a plan to fix this?
It's not a problem, it's by design. It's in the Manual and References that you cannot access the drive via the Web Player, but you can with stand-alone and mobile builds.
I still suggest fixing this design. SDK from Parse.com for example enables to do such things from webplayer also :)
Thanks for suggestion.
Unity web player does not upload images to server but it can be download images for our servers using get methods.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...