Merge pull request #3100 from mstojcevich/master

Update Lambda URLs
This commit is contained in:
Jaex 2018-01-29 00:23:50 +03:00 committed by GitHub
commit 854c2d658d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,6 +47,12 @@ public override bool CheckConfig(UploadersConfig config)
public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo)
{
// Correct old URLs
if (config.LambdaSettings != null && config.LambdaSettings.UploadURL == "https://λ.pw/")
{
config.LambdaSettings.UploadURL = "https://lbda.net/";
}
return new Lambda(config.LambdaSettings);
}
@ -62,9 +68,9 @@ public Lambda(LambdaSettings config)
Config = config;
}
private const string uploadUrl = "https://lambda.sx/api/upload";
private const string uploadUrl = "https://lbda.net/api/upload";
public static string[] UploadURLs = new string[] { "https://λ.pw/", "https://lambda.sx/" };
public static string[] UploadURLs = new string[] { "https://lbda.net/", "https://lambda.sx/" };
public override UploadResult Upload(Stream stream, string fileName)
{
@ -109,6 +115,6 @@ internal class LambdaFile
public class LambdaSettings
{
public string UserAPIKey = "";
public string UploadURL = "https://λ.pw/";
public string UploadURL = "https://lbda.net/";
}
}