将文件上传到保管箱中的特定文件夹 [英] Upload files to a specific folder in dropbox

查看:90
本文介绍了将文件上传到保管箱中的特定文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此示例将文件上传到保管箱:

I was using this example to upload files to dropbox:


http://cgeers.com/2012/03/11/dropbox-rest-api-part-5- file-upload /

哪个是:

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




该方法具有3个参数:

The method has 3 parameters:

root:指定路径的相对根。有效值
是沙箱和保管箱。

路径:
上传的文件的路径。

文件:要上传的本地文件的绝对路径

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

按以下方式调用此方法:



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

Dropbox API与示例完全相同:

Dropbox API says exactly the same as the example:


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

所以没有提到父文件夹。.

如何在特定文件夹而不是根目录下上传文件?

So no mentioning of "parent folder"..
How can I upload files under a specific folder instead of the root?

推荐答案

您不能这样做

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

这篇关于将文件上传到保管箱中的特定文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆