Reorder enum

Some more work on gcs
This commit is contained in:
Matthew Burnett 2018-04-19 17:48:59 -04:00
parent 233d822c24
commit bfdede32eb
2 changed files with 8 additions and 6 deletions

View file

@ -99,10 +99,10 @@ public enum FileDestination
Mega, Mega,
[Description("Amazon S3")] [Description("Amazon S3")]
AmazonS3, AmazonS3,
[Description("Azure Storage")]
AzureStorage,
[Description("Google Cloud Storage")] [Description("Google Cloud Storage")]
GoogleCloudStorage, GoogleCloudStorage,
[Description("Azure Storage")]
AzureStorage,
[Description("Gfycat")] [Description("Gfycat")]
Gfycat, Gfycat,
[Description("ownCloud / Nextcloud")] [Description("ownCloud / Nextcloud")]

View file

@ -24,13 +24,15 @@ public override GenericUploader CreateUploader(UploadersConfig config, TaskRefer
public sealed class GoogleCloudStorage : FileUploader public sealed class GoogleCloudStorage : FileUploader
{ {
public string APIKey { get; set; } public string APIKey { get; set; }
public string bucket { get; set; }
public override UploadResult Upload(Stream stream, string fileName) public override UploadResult Upload(Stream stream, string fileName)
{ {
Dictionary<string, string> args = new Dictionary<string, string> string uploadurl = $"https://www.googleapis.com/upload/storage/v1/b/{bucket}/o";
{ string objecturl = $"https://www.googleapis.com/upload/storage/v1/b/{bucket}/o/{fileName}/acl";
{ "key", APIKey }
}; Dictionary<string, string> args = new Dictionary<string, string>();
args.Add("key", APIKey);
return null; return null;
} }