cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

uploading video through api not working

uploading video through api not working

Eric S.36
New member | Level 1

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 

5 Replies 5

Greg-DB
Dropbox Staff

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.

Eric S.36
New member | Level 1

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 

Greg-DB
Dropbox Staff

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.

Eric S.36
New member | Level 1

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 

Greg-DB
Dropbox Staff

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Eric S.36 New member | Level 1
What do Dropbox user levels mean?