gpt4 book ai didi

c# - 将文件上传到保管箱中的特定文件夹

转载 作者:行者123 更新时间:2023-11-30 14:32:51 28 4
gpt4 key购买 nike

我使用这个例子将文件上传到保管箱:

https://github.com/geersch/DropboxRESTApi/blob/master/src/part-5/README.md

这是:

public FileSystemInfo UploadFile(string root, string path, string file)
{
//...
}

The method has 3 parameters:

root: The root relative to which the path is specified. Valid valuesare sandbox and dropbox.
path: The path to the file you want toupload.
file: Absolute path to the local file you want to upload

Call this method as follows:

var file = api.UploadFile("dropbox", "photo.jpg", @"C:\Pictures\photo.jpg");  

Dropbox API 与示例完全相同:

https://www.dropbox.com/developers/core/docs#files-POST

所以没有提到“父文件夹”..
如何上传特定文件夹下而不是根目录下的文件?

最佳答案

你能不能做

var file = api.UploadFile("dropbox", @"myfolder\photo.jpg", @"C:\Pictures\photo.jpg");  

关于c# - 将文件上传到保管箱中的特定文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17699031/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com