Begin GCS

This commit is contained in:
Matthew Burnett 2018-04-19 17:30:56 -04:00
parent 9f1728bc5e
commit 233d822c24
3 changed files with 41 additions and 0 deletions

View file

@ -101,6 +101,8 @@ public enum FileDestination
AmazonS3,
[Description("Azure Storage")]
AzureStorage,
[Description("Google Cloud Storage")]
GoogleCloudStorage,
[Description("Gfycat")]
Gfycat,
[Description("ownCloud / Nextcloud")]

View file

@ -0,0 +1,38 @@
using System.Collections.Generic;
using System.IO;
namespace ShareX.UploadersLib.FileUploaders
{
public class GoogleCloudStorageNewFileUploaderService : FileUploaderService
{
public override FileDestination EnumValue { get; } = FileDestination.GoogleCloudStorage;
public override bool CheckConfig(UploadersConfig config)
{
return true;
}
public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo)
{
return new GoogleCloudStorage
{
APIKey = "null"
};
}
}
public sealed class GoogleCloudStorage : FileUploader
{
public string APIKey { get; set; }
public override UploadResult Upload(Stream stream, string fileName)
{
Dictionary<string, string> args = new Dictionary<string, string>
{
{ "key", APIKey }
};
return null;
}
}
}

View file

@ -142,6 +142,7 @@
<Compile Include="FileUploaders\AmazonS3Settings.cs" />
<Compile Include="FileUploaders\AzureStorage.cs" />
<Compile Include="FileUploaders\Box.cs" />
<Compile Include="FileUploaders\GoogleCloudStorage.cs" />
<Compile Include="FileUploaders\Lithiio.cs" />
<Compile Include="FileUploaders\Plik.cs" />
<Compile Include="FileUploaders\PlikSettings.cs" />