【问题标题】:Create folder automatically during file uploading in C# using Dropbox Core API使用 Dropbox Core API 在 C# 中上传文件时自动创建文件夹
【发布时间】:2016-06-07 00:41:48
【问题描述】:

假设我有一个 Dropbox 帐户,我想在路径“/Client1/2016/filename.txt”中上传一个文件。我的保管箱帐户中没有“Client1”或“2016”文件夹。我的要求是文件上传时会自动创建导航路径文件夹“Client1/2016/”并上传文件。可以吗? 我正在使用以下代码进行文件上传-

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}
                                        }
                                    );

【问题讨论】:

标签: c# dropbox dropbox-api


【解决方案1】:

您要求的是 API 已经工作的方式。如果您将文件上传到路径/foo/bar,将根据需要创建文件夹/foo

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多