mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-30 20:20:34 +12:00
Begin GCS
This commit is contained in:
parent
9f1728bc5e
commit
233d822c24
|
@ -101,6 +101,8 @@ public enum FileDestination
|
|||
AmazonS3,
|
||||
[Description("Azure Storage")]
|
||||
AzureStorage,
|
||||
[Description("Google Cloud Storage")]
|
||||
GoogleCloudStorage,
|
||||
[Description("Gfycat")]
|
||||
Gfycat,
|
||||
[Description("ownCloud / Nextcloud")]
|
||||
|
|
38
ShareX.UploadersLib/FileUploaders/GoogleCloudStorage.cs
Normal file
38
ShareX.UploadersLib/FileUploaders/GoogleCloudStorage.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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" />
|
||||
|
|
Loading…
Reference in a new issue