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: 

Copy function having the from and to path issue

Copy function having the from and to path issue

vaishali1
Explorer | Level 3
Go to solution

I am using dropbox php SDK and using copy function i am trying to copy one folder to another folder but in response i am getting following error: For copy function i am giving from path like "/test" and to path like "/abc"

 

Fatal error: Uncaught exception 'Kunnu\Dropbox\Exceptions\DropboxClientException' with message '{"error_summary": "to/conflict/folder/..", "error": {".tag": "to", "to": {".tag": "conflict", "conflict": {".tag": "folder"}}}}' in /websites/se/securerda.com.au/wordpress/wp-content/plugins/out-of-the-box/includes/dropbox-sdk/src/Dropbox/Http/Clients/DropboxGuzzleHttpClient.php:67

Stack trace:
 #0 /websites/se/securerda.com.au/wordpress/wp-content/plugins/out-of-the-box/includes/dropbox-sdk/src/Dropbox/DropboxClient.php(155): Kunnu\Dropbox\Http\Clients\DropboxGuzzleHttpClient->send('https://api.dro...', 'POST', '{"from_path":"\\...', Array)
 #1 /websites/se/securerda.com.au/wordpress/wp-content/plugins/out-of-the-box/includes/dropbox-sdk/src/Dropbox/Dropbox.php(247): Kunnu\Dropbox\DropboxClient->sendRequest(Object(Kunnu\Dropbox\DropboxRequest))
 #2 /websites/se/securerda.com.au/wordpress/wp-content/plugins/out-of-the-box/includes/dropbox-sdk/src/Dropbox/Dropbox.php(261): Kunnu\Dropbox\Dropbox->sendRequest('POST', '/files/copy', ' in /websites/se/securerda.com.au/wordpress/wp-content/plugins/out-of-the-box/includes/dropbox-sdk/src/Dropbox/Http/Clients/DropboxGuzzleHttpClient.php on line 67


Please help me in this issue

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Per the /2/files/copy_v2 documentation, a `to/conflict/folder` error indicates that the operation failed because there's a folder in the way.

 

In your example, that means that there's already a folder at "/abc". 

 

Note that you need to specify the full desired destination path, including name, in `to_path`. That is, in this case, if you wanted to move the "test" folder inside the already-existing "abc" folder, your `to_path` should be "/abc/test".

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

Per the /2/files/copy_v2 documentation, a `to/conflict/folder` error indicates that the operation failed because there's a folder in the way.

 

In your example, that means that there's already a folder at "/abc". 

 

Note that you need to specify the full desired destination path, including name, in `to_path`. That is, in this case, if you wanted to move the "test" folder inside the already-existing "abc" folder, your `to_path` should be "/abc/test".

vaishali1
Explorer | Level 3
Go to solution

Thanks  Greg for your help. My issue get sloved.

:slight_smile:

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    vaishali1 Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?