We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

Swissdoode's avatar
Swissdoode
Explorer | Level 3
2 years ago

No exact matches in call to instance method 'upload' when trying to upload a file to DP

Hi everybody!

 

I'm trying to upload a file to DB using iOS's SwiftyDropbox.

 

According to the docs, I should use something like this:

 

if let client = DropboxClientsManager.authorizedClient {

 

let request = client.files.upload(path: "/test/path/in/Dropbox/account", mode: Files.WriteMode.overwrite, input: videoData)

.response { response, error in

if let response = response {

print(response)

} else if let error = error {

print(error)

}

}

.progress { progressData in

print(progressData)

}

 

}

 

But this gives me an error in XCode saying No exact matches in call to instance method 'upload' 

 

What am I doing wrong?

1 Reply

  • Swissdoode's avatar
    Swissdoode
    Explorer | Level 3
    2 years ago

    I found the problem. 

    I need to use 

    DropboxClientsManager.authorizedClient!.files.upload(path:"/myFile.mp4", input:uploadData! as Data)

    Now it's working.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 3 hours ago
410 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or 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!