Problems using User...
 
Notifications
Clear all

Problems using UserFiles

3 Posts
2 Users
0 Reactions
833 Views
(@tommih)
Posts: 44
Trusted Member
Topic starter
 

Hello again.

I have some more problems using the UserFiles:

1) When I try to download the list of files:

UserFile.Load(CombuManager.localUser.idfalse01, (UserFile[] filesint resultsCountint pagesCountstring error) => {

... about 50% of the time I get back an error: "unable to connect to host". This seems odd since I've just logged in with the server successfully, and we haven't had any other connection issues.

2) When I try to upload a new file I made:

combuFile = new UserFile();

combuFile.sharing = UserFile.eShareType.Nobody;
combuFile.Update(StringToBytes(string.Empty), (bool successstring error) => {

... I always get either an empty error or "File not uploaded". I'm not sure how I should read that last error: Does it mean the file failed to upload for some reason, or does it mean you can call Update on a file that doesn't exist on the server? The latter is true in my case, but if that's the reason, how can I upload new files to the server?

 
Posted : 10/10/2015 10:47 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

Why are you passing 0 as pageNumber? Page numbers start from 1, so you're basically asking for "no page" with "1 result per page". Anyway "unable to connect to host" is coming from Unity WWW, it means that some times the server fails to respond in time.

About the error on Update, "File not uploaded" means that there was a problem with the uploaded file (empty bytes, or couldn't upload, or other PHP error during upload). There cannot be an empty error, may be it was because of non-answered call to web service (all errors are catched and detailed in the web service).

The error "unable to connect to host" and the empty error in Update let me think that you or your server are experiencing connection issues some times.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 10/10/2015 11:44 pm
(@tommih)
Posts: 44
Trusted Member
Topic starter
 

Thanks for the response.

Ah, empty bytes are forbidden. I was trying to test the upload with empty bytes.

And right, the starting from 1 rule. Not standard practice but I'll keep that in mind.

This is the only time we've experienced connection issues.

 
Posted : 11/10/2015 1:30 am
Share: