Merge pull request #2044 from gpailler/master

#1737 Updated MegaApiClient to 1.3.0. Fixed upload progression reset issue
This commit is contained in:
Jaex 2016-11-09 08:49:19 +02:00 committed by GitHub
commit 420734415f
5 changed files with 9 additions and 8 deletions

View file

@ -58,6 +58,11 @@ public override GenericUploader CreateUploader(UploadersConfig config, TaskRefer
public sealed class Mega : FileUploader, IWebClient
{
// Pack all chunks in a single upload fragment
// (by default, MegaApiClient splits files in 1MB fragments and do multiple uploads)
// It allows to have a consistent upload progression in Sharex
private const int UploadChunksPackSize = -1;
private readonly MegaApiClient _megaClient;
private readonly MegaApiClient.AuthInfos _authInfos;
private readonly string _parentNodeId;
@ -74,6 +79,7 @@ public Mega(MegaApiClient.AuthInfos authInfos, string parentNodeId)
{
AllowReportProgress = false;
_megaClient = new MegaApiClient(this);
_megaClient.ChunksPackSize = UploadChunksPackSize;
_authInfos = authInfos;
_parentNodeId = parentNodeId;
}

View file

@ -86,8 +86,8 @@
<HintPath>..\packages\AWSSDK.S3.3.1.10.0\lib\net35\AWSSDK.S3.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MegaApiClient, Version=1.2.2.209, Culture=neutral, PublicKeyToken=0480d311efbeb4e2, processorArchitecture=MSIL">
<HintPath>..\packages\MegaApiClient.1.2.2\lib\net40\MegaApiClient.dll</HintPath>
<Reference Include="MegaApiClient, Version=1.3.1.269, Culture=neutral, PublicKeyToken=0480d311efbeb4e2, processorArchitecture=MSIL">
<HintPath>..\packages\MegaApiClient.1.3.1\lib\net40\MegaApiClient.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">

View file

@ -2,7 +2,7 @@
<packages>
<package id="AWSSDK.Core" version="3.1.11.0" targetFramework="net40" />
<package id="AWSSDK.S3" version="3.1.10.0" targetFramework="net40" />
<package id="MegaApiClient" version="1.2.2" targetFramework="net40" />
<package id="MegaApiClient" version="1.3.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net40" />
<package id="SSH.NET" version="2014.4.6-beta2" targetFramework="net40" />
<package id="System.Net.FtpClient" version="1.0.5281.14359" targetFramework="net40" />

View file

@ -76,10 +76,6 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="MegaApiClient, Version=1.2.2.209, Culture=neutral, PublicKeyToken=0480d311efbeb4e2, processorArchitecture=MSIL">
<HintPath>..\packages\MegaApiClient.1.2.2\lib\net40\MegaApiClient.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MegaApiClient" version="1.2.2" targetFramework="net40" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net40" />
<package id="SevenZipSharp" version="0.64" targetFramework="net40" />
</packages>