[英]Create folder automatically during file uploading in C# using Dropbox Core API
Suppose I have a Dropbox account and I want to upload a file in the path "/Client1/2016/filename.txt". 假设我有一个Dropbox帐户,并且想在路径“ /Client1/2016/filename.txt”中上传文件。 There are no folder in my dropbox account either "Client1" or "2016". 我的保管箱帐户中没有“ Client1”或“ 2016”文件夹。 My requirement is When the file will upload it will automatically create the navigation path folder "Client1/2016/" and upload the file.Is it possible? 我的要求是文件上传时会自动创建导航路径文件夹“ Client1 / 2016 /”并上传文件。可以吗? I'm using the following code for file upload- 我正在使用以下代码进行文件上传-
RequestResult strReq = OAuthUtility.Put(
"https://api-content.dropbox.com/1/files_put/auto/",
new HttpParameterCollection
{
{"access_token", "AccessToken"},
{"path", "filepath"},
{"overwrite", "false"},
{"autorename","false"},
{stream}
}
);
What you're asking for is the way that the API already works. 您要的是API已经起作用的方式。 If you upload a file to the path /foo/bar
, the folder /foo
will be created as necessary. 如果将文件上传到路径/foo/bar
,则将根据需要创建/foo
文件夹。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.