Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18d2dfb86e | ||
|
|
ef3f1bfa88 | ||
|
|
01a2689549 | ||
|
|
916f046789 | ||
|
|
51ac170a22 |
@@ -1,6 +1,9 @@
|
||||
name: PublishNugetPackage
|
||||
|
||||
on: [create]
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
@@ -55,6 +55,19 @@ namespace SimApi.Helpers
|
||||
}
|
||||
}
|
||||
|
||||
public string GetUploadUrl(string path, int expire = 7200)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Mc.PresignedPutObjectAsync(Bucket, path, expire).Result;
|
||||
}
|
||||
catch (MinioException e)
|
||||
{
|
||||
Console.WriteLine("Error occurred: " + e);
|
||||
return e.Message;
|
||||
}
|
||||
}
|
||||
|
||||
public string UploadFile(string path, Stream stream)
|
||||
{
|
||||
try
|
||||
|
||||
+2
-10
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
@@ -14,7 +13,7 @@ namespace SimApi.Helpers
|
||||
/// <returns></returns>
|
||||
public static bool CheckCell(string cell)
|
||||
{
|
||||
var regex = new Regex("^1[34578]\\d{9}$");
|
||||
var regex = new Regex("^1[3456789]\\d{9}$");
|
||||
return regex.IsMatch(cell);
|
||||
}
|
||||
|
||||
@@ -37,12 +36,5 @@ namespace SimApi.Helpers
|
||||
|
||||
return strbul.ToString();
|
||||
}
|
||||
|
||||
public static void Log(string message, string type = "Information")
|
||||
{
|
||||
Console.WriteLine($"[ SimApi ][ {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff")} ][ {type} ]");
|
||||
Console.WriteLine(message);
|
||||
Console.WriteLine("");
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -175,7 +175,7 @@ namespace SimApi
|
||||
builder.ApplicationServices.GetService<ILoggerFactory>().AddProvider(new SimApiLoggerProvider());
|
||||
}
|
||||
|
||||
var logger = builder.ApplicationServices.GetService<ILogger>();
|
||||
var logger = builder.ApplicationServices.GetService<ILogger<SimApiLogger>>();
|
||||
|
||||
if (options.EnableForwardHeaders)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user