Error while Uploading file with Unity

0 votes

Hello,

I am trying to upload a file with the following code:

   UploadService.UploadFileForUser

  (

      "record",
      "tutu",
      "P:\\Fortress\\record.bin",
      UploadFileType.OTHER, 
     "empty", 
      app42Reply
   );  
 
In the callback, i am getting the following exeption:
 
{"httpErrorCode":"400", "appErrorCode":"1400", "message":"Bad Request", "details":"The Request parameters are invalid"}
 
I can upload the exact same file with the same parameters from the App42 web interface.
I tryed different file formats (BIN...).
I tried different file path and file path formats.
The user is existing (and it works with the web interface).
 
I use : App42_Unity3D_SDK_2.6.1.dll
 
Any idea ?
asked Apr 30, 2014 in App42 Cloud API-BaaS by yves.grolet (10 points)

1 Answer

0 votes

Thanx for connecting with us,

This error comes because you didn't initialize App42API,  as mentioned in API DOCS.

Just put  App42API.Initialize("YOUR_API_KEY", "YOUR_SECRET_KEY"); , in your start function of Unity.

Happy Coding.  :) 

answered Apr 30, 2014 by Akshay.Mishra (179 points)
It works, thanks :-)
Ur Welcome, nd still if u have any further issue, then feel free to ask us...
And, if u got your answer then select the answer as solved.. O.K..
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
...