Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
**2017-02-15**

最新版本v7.2.10,适用于.NET Framework 2.0+ , .NET Core 和 UWP

移除:移除`Qiniu.IO.SimpleUploader`

优化:部分细节优化

更新:User-Agent格式为`SDK_ALIAS/SDK_VERSION (RUNTIME; OS_DECRIPTION)`

更新:新增DLL文件签名

* * *

**2017-02-13**

最新版本v7.2.9,适用于.NET Framework 2.0+ , .NET Core 和 UWP
Expand Down
6 changes: 3 additions & 3 deletions README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ This C# SDK is built based on Qiniu Cloud API (see below), and it can be used on

You can have a better view of this SDK by checking the documnets given below:

* [SDK-reference HTML Online](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-ref-v7.2.9/index.html)
* [SDK-reference HTML Online](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-ref-v7.2.10/index.html)

* [SDK-reference CHM Offline](http://oiy037d6a.bkt.clouddn.com/QiniuCSharpSDK-Ref-v7.2.9.chm)
* [SDK-reference CHM Offline](http://oiy037d6a.bkt.clouddn.com/QiniuCSharpSDK-Ref-v7.2.10.chm)

Want to know more about how to using this SDK? Are you trying to find some code examples based on this SDK? These documents or links below will be helpful:

* [github/csharp-sdk-shared-examples](https://github.com/fengyhack/csharp-sdk-shared-examples)

* [SDK manual | examples](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-man-v7.2.9/index.html)
* [SDK manual | examples](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-man-v7.2.10/index.html)

Or if you want to develop **UWP apps**, see example(s) given below.

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

以下文档用于检索SDK接口、属性说明,它将有助于您理解SDK的结构。

* [HTML在线浏览](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-ref-v7.2.9/index.html)
* [HTML在线浏览](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-ref-v7.2.10/index.html)

* [CHM文件下载](http://oiy037d6a.bkt.clouddn.com/QiniuCSharpSDK-Ref-v7.2.9.chm)
* [CHM文件下载](http://oiy037d6a.bkt.clouddn.com/QiniuCSharpSDK-Ref-v7.2.10.chm)

以下文档/链接提供一些基本示例,参考这些示例可以帮助您更快熟悉如何使用这套SDK。

* [github | csharp-sdk-examples](https://github.com/fengyhack/csharp-sdk-examples)

* [C# SDK使用指南 | 代码示例](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-man-v7.2.9/index.html)
* [C# SDK使用指南 | 代码示例](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-man-v7.2.10/index.html)

如果您想开发**UWP应用**,您也可以参考如下示例。

Expand Down
Binary file added bin/qiniu-csharp-sdk-v7.2.10.zip
Binary file not shown.
Binary file removed bin/qiniu-csharp-sdk-v7.2.9.zip
Binary file not shown.
33 changes: 30 additions & 3 deletions doc/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,33 @@

<h1 id="qiniu-cloud-c-sdk">Qiniu (Cloud) C# SDK</h1>

<div><div class="toc"><div class="toc">
<ul>
<li><a href="#关于">关于</a></li>
<li><a href="#sdk文档">SDK文档</a></li>
<li><a href="#如何安装">如何安装</a></li>
<li><a href="#如何编译">如何编译</a></li>
<li><a href="#api参考手册">API参考手册</a></li>
<li><a href="#相关资源">相关资源</a></li>
<li><a href="#贡献代码">贡献代码</a></li>
<li><a href="#许可证">许可证</a></li>
<li><a href="#附录">附录</a><ul>
<li><a href="#速览net-core">速览.NET Core</a><ul>
<li><a href="#1-创建">1. 创建</a></li>
<li><a href="#2-发布">2. 发布</a></li>
<li><a href="#3-执行">3. 执行</a></li>
</ul>
</li>
<li><a href="#速览win10-uwp">速览Win10 UWP</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>

<h2 id="关于">关于</h2>

<p>此 C# SDK 适用于.NET Framework 2.0+ , .NET Core 以及UWP(Windows 10 通用应用),基于七牛云API参考手册构建。使用此 SDK 构建您的网络应用程序,能让您以非常便捷地方式将数据安全地存储到七牛云存储上。无论您的网络应用是一个网站程序,还是包括从云端(服务端程序)到终端(手持设备应用)的架构的服务或应用,通过七牛云存储及其 SDK,都能让您应用程序的终端用户高速上传和下载,同时也让您的服务端更加轻盈。</p>
Expand All @@ -19,14 +46,14 @@ <h2 id="sdk文档">SDK文档</h2>

<p>以下文档用于检索SDK接口、属性说明,它将有助于您理解SDK的结构。</p>

<ul><li><p><a href="http://oiy037d6a.bkt.clouddn.com/csharp-sdk-ref-v7.2.9/index.html" target="_blank">HTML在线浏览</a></p></li>
<li><p><a href="http://oiy037d6a.bkt.clouddn.com/QiniuCSharpSDK-Ref-v7.2.9.chm" target="_blank">CHM文件下载</a></p></li>
<ul><li><p><a href="http://oiy037d6a.bkt.clouddn.com/csharp-sdk-ref-v7.2.10/index.html" target="_blank">HTML在线浏览</a></p></li>
<li><p><a href="http://oiy037d6a.bkt.clouddn.com/QiniuCSharpSDK-Ref-v7.2.10.chm" target="_blank">CHM文件下载</a></p></li>
</ul>

<p>以下文档/链接提供一些基本示例,参考这些示例可以帮助您更快熟悉如何使用这套SDK。</p>

<ul><li><p><a href="https://github.com/fengyhack/csharp-sdk-examples" target="_blank">github | csharp-sdk-examples</a></p></li>
<li><p><a href="http://oiy037d6a.bkt.clouddn.com/csharp-sdk-man-v7.2.9/index.html" target="_blank">C# SDK使用指南 | 代码示例</a></p></li>
<li><p><a href="http://oiy037d6a.bkt.clouddn.com/csharp-sdk-man-v7.2.10/index.html" target="_blank">C# SDK使用指南 | 代码示例</a></p></li>
</ul>

<p>如果您想开发<strong>UWP应用</strong>,您也可以参考如下示例。</p>
Expand Down
Binary file modified doc/README.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions src/Qiniu.NetCore/project.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Qiniu (Cloud) C# SDK v7.2.9 (.Net Core)",
"title": "Qiniu (Cloud) C# SDK v7.2.10 (.Net Core)",
"copyright": "Copyright © 2017",
"description": "Qiniu (Cloud) C# SDK v7.2.9 (.Net Core)",
"version": "7.2.9-0",
"description": "Qiniu (Cloud) C# SDK v7.2.10 (.Net Core)",
"version": "7.2.10-0",
"dependencies": {
"NETStandard.Library": "1.6.0",
"Newtonsoft.Json": "9.0.1"
Expand Down
4 changes: 2 additions & 2 deletions src/Qiniu.UnitTest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.2.9.0")]
[assembly: AssemblyFileVersion("7.2.9.0")]
[assembly: AssemblyVersion("7.2.10.0")]
[assembly: AssemblyFileVersion("7.2.10.0")]
12 changes: 6 additions & 6 deletions src/Qiniu.UnitTest/Qiniu.UnitTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<Reference Include="nunit.framework, Version=3.6.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Qiniu">
<HintPath>..\..\bin\net40\Qiniu.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\bin\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.6.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\bin\net40\nunit.framework.dll</HintPath>
<Private>True</Private>
<HintPath>..\..\bin\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
Expand Down
4 changes: 2 additions & 2 deletions src/Qiniu/Http/HttpManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public HttpManager(bool allowAutoRedirect = false)
public static string GetUserAgent()
{
string osDesc = Environment.OSVersion.Platform + "; " + Environment.OSVersion.Version;
return string.Format("{0}-{1}/{2} ({3})", QiniuCSharpSDK.ALIAS, QiniuCSharpSDK.RTFX, QiniuCSharpSDK.VERSION, osDesc);
return string.Format("{0}/{1} ({2}; {3})", QiniuCSharpSDK.ALIAS, QiniuCSharpSDK.VERSION, QiniuCSharpSDK.RTFX, osDesc);
}

/// <summary>
Expand Down Expand Up @@ -1356,7 +1356,7 @@ public static string GetUserAgent()
#else
string osDesc = "UNKNOWN";
#endif
return string.Format("{0}-{1}/{2} ({3})", QiniuCSharpSDK.ALIAS, QiniuCSharpSDK.RTFX, QiniuCSharpSDK.VERSION, osDesc);
return string.Format("{0}/{1} ({2}; {3})", QiniuCSharpSDK.ALIAS, QiniuCSharpSDK.VERSION, QiniuCSharpSDK.RTFX, osDesc);
}

/// <summary>
Expand Down
40 changes: 10 additions & 30 deletions src/Qiniu/IO/FormUploader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ public HttpResult UploadFile(string localFile, string saveKey, string token)
sbp1.AppendLine(token);
sbp1.AppendLine("--" + boundary);

// FIX 2017-02-09 https://github.com/qiniu/csharp-sdk/issues/140
string filename = Util.Hashing.CalcMD5(saveKey);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename={0}", filename);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename=\"{0}\"", saveKey);
sbp1.AppendLine();
sbp1.AppendLine();

Expand Down Expand Up @@ -166,9 +164,7 @@ public HttpResult UploadFile(string localFile, string saveKey, string token, Dic
sbp1.AppendLine("--" + boundary);
}

// FIX 2017-02-09 https://github.com/qiniu/csharp-sdk/issues/140
string filename = Util.Hashing.CalcMD5(saveKey);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename={0}", filename);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename=\"{0}\"", saveKey);
sbp1.AppendLine();
sbp1.AppendLine();

Expand Down Expand Up @@ -245,9 +241,7 @@ public HttpResult UploadData(byte[] data, string saveKey, string token)
sbp1.AppendLine(token);
sbp1.AppendLine("--" + boundary);

// FIX 2017-02-09 https://github.com/qiniu/csharp-sdk/issues/140
string filename = Util.Hashing.CalcMD5(saveKey);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename={0}", filename);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename=\"{0}\"", saveKey);
sbp1.AppendLine();
sbp1.AppendLine();

Expand Down Expand Up @@ -324,9 +318,7 @@ public HttpResult UploadStream(Stream stream, string saveKey, string token)
sbp1.AppendLine(token);
sbp1.AppendLine("--" + boundary);

// FIX 2017-02-09 https://github.com/qiniu/csharp-sdk/issues/140
string filename = Util.Hashing.CalcMD5(saveKey);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename={0}", filename);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename=\"{0}\"", saveKey);
sbp1.AppendLine();
sbp1.AppendLine();

Expand Down Expand Up @@ -426,9 +418,7 @@ public async Task<HttpResult> UploadFileAsync(string localFile, string saveKey,
sbp1.AppendLine(token);
sbp1.AppendLine(sep);

// FIX 2017-02-09 https://github.com/qiniu/csharp-sdk/issues/140
string filename = Util.Hashing.CalcMD5(saveKey);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename={0}", filename);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename=\"{0}\"", saveKey);
sbp1.AppendLine();
sbp1.AppendLine();

Expand Down Expand Up @@ -507,9 +497,7 @@ public async Task<HttpResult> UploadFileAsync(string localFile, string saveKey,
sbp1.AppendLine(sep);
}

// FIX 2017-02-09 https://github.com/qiniu/csharp-sdk/issues/140
string filename = Util.Hashing.CalcMD5(saveKey);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename={0}", filename);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename=\"{0}\"", saveKey);
sbp1.AppendLine();
sbp1.AppendLine();

Expand Down Expand Up @@ -605,9 +593,7 @@ public async Task<HttpResult> UploadFileAsync(StorageFile file, string saveKey,
sbp1.AppendLine(token);
sbp1.AppendLine(sep);

// FIX 2017-02-09 https://github.com/qiniu/csharp-sdk/issues/140
string filename = Util.Hashing.CalcMD5(saveKey);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename={0}", filename);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename=\"{0}\"", saveKey);
sbp1.AppendLine();
sbp1.AppendLine();

Expand Down Expand Up @@ -686,9 +672,7 @@ public async Task<HttpResult> UploadFileAsync(StorageFile file, string saveKey,
sbp1.AppendLine(sep);
}

// FIX 2017-02-09 https://github.com/qiniu/csharp-sdk/issues/140
string filename = Util.Hashing.CalcMD5(saveKey);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename={0}", filename);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename=\"{0}\"", saveKey);
sbp1.AppendLine();
sbp1.AppendLine();

Expand Down Expand Up @@ -786,9 +770,7 @@ public async Task<HttpResult> UploadDataAsync(byte[] data, string saveKey, strin
sbp1.AppendLine(token);
sbp1.AppendLine(sep);

// FIX 2017-02-09 https://github.com/qiniu/csharp-sdk/issues/140
string filename = Util.Hashing.CalcMD5(saveKey);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename={0}", filename);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename=\"{0}\"", saveKey);
sbp1.AppendLine();
sbp1.AppendLine();

Expand Down Expand Up @@ -857,9 +839,7 @@ public async Task<HttpResult> UploadStreamAsync(Stream stream, string saveKey, s
sbp1.AppendLine(token);
sbp1.AppendLine(sep);

// FIX 2017-02-09 https://github.com/qiniu/csharp-sdk/issues/140
string filename = Util.Hashing.CalcMD5(saveKey);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename={0}", filename);
sbp1.AppendFormat("Content-Disposition: form-data; name=file; filename=\"{0}\"", saveKey);
sbp1.AppendLine();
sbp1.AppendLine();

Expand Down
Loading