我无法将数据从我的应用程序上传到保管箱

I can't upload data from my app to dropbox

我无法将数据从我的应用程序上传到保管箱。我总是收到此错误:

 'Error in call to API function "files/upload": HTTP header "Dropbox-API-Arg": path: \'\Songs\539f67c172ec78e3f7608a64537616a5.mp3\' did not match pattern \'(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)\'',

我创建了保管箱应用程序,生成了应用程序访问令牌并在我的环境文件中添加了令牌。

const uploadSong = async (file, song) => {
    const destination = path.join(process.env.DROPBOX_UPLOAD_PATH, song.asset_sound.fileNameFull);
    console.log('Uploading to DROPBOX ...', destination);
    return  await dbx.filesUpload({ path: destination, contents: file.buffer, mode: 'overwrite'});
};

您提供给 filesUploadpath 参数的路径应该是您要上传文件的远程 Dropbox 路径。它的格式应该像 '/path/to/file.ext'.

您正在提供类似 '\Songs9f67c172ec78e3f7608a64537616a5.mp3' 的内容。我想你的意思是提供类似 '/Songs/539f67c172ec78e3f7608a64537616a5.mp3' 的东西。