冲突文件夹移动Dropbox API



我正试图将一些文件从一个文件夹移动到另一个文件夹。

这是我的卷曲请求:

curl -X POST https://api.dropboxapi.com/2/files/move 
  --header 'Authorization: Bearer faketokenjskahdLDAKHDALjdj8287ew98ehsahdkkadjhk' 
  --header 'Content-Type: application/json' 
  --data '{"from_path":"/folder1","to_path":"/folder2/folder2.1"}'

每当我叫它时,我都会得到这样的回复:

{
  "error_summary": "to/conflict/folder/...",
  "error": {
    ".tag": "to",
    "to": {
      ".tag": "conflict",
      "conflict": {
        ".tag": "folder"
      }
    }
  }
}

文档对回复中的具体关键词进行了以下说明:

conflict :  Couldn't write to the target path because there was something in the way.
folder:  There's a folder in the way. 

怎么会有文件夹挡道呢?这到底意味着什么?我不知道该怎么办才能解决这个问题。

/move端点的文档可以在此处找到

通过请求folder1/中的文件列表,然后循环遍历其中的每个文件,并将它们移动到from_path folder1/filename to_path folder2/folder2.1/filename

我需要把文件名放在两个路径的末尾,以避免任何冲突!

最新更新