Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I'm using the IOs sdk and trying to upload a small video. It keeps giving me the following error
[WARNING] DropboxSDK: error making request to /1/files_put/sandbox/YourFolder/BNaUmF.m4v - (-1005) Error Domain=NSURLErrorDomain Code=-1005 "The operation couldn’t be completed.
odly, it seemed to work one time, I didn't change the code ... I'm running on the device using iOS 7
Per the documentation, NSURLErrorDomain Code=-1005 is:
NSURLErrorNetworkConnectionLost = -1005,
Is the network connection on that device working properly? Is there anything on the network connection for that device that may be interfering? In any case, it may be good to implement some automatic retrying.
Te network connection seems to work fine, it's actually able to upload images in the same fashion but the short videos seem to be a problem, some are only 50k so I know it's not a file size issue it seems to fail every single time .... the very strange part is, that when I put a breakpoint in front of the call, it seems to work
Getting it to work by adding the breakpoint does seem strange, though perhaps that's causing a timing change. The error code does indicate a network issue though. Are you running multiple of these simultaneously? Perhaps the delay from the breakpoint is allowing your network connection to clear up.
In any case, can you try it on another network connection? Also, trying on another device might be useful.
I'm wondering if the Error could be misleading ... I'm only making the call once, again for images it seems to work fine with no errors consistently, but with the video it fails ... I'm calling the function as soon as the video is done encoding .... my thought is that perhaps even though the completion event is fired, something in the file system is not done yet .... as a result It cant read the file. This is totally conjecture, but when I call the upload function after 50 ms, it works, so it leads me to believe maybe something like that is going on, and that the -1005 error is just red harring
I suppose that's possible. Trying different network connections/devices may help confirm or rule that out. Also, you may want to try simplifying things, e.g., remove the part where you use a newly encoded file and just try an existing local video file, to try to narrow this down.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!