123
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
RakVhalate 2022-12-01 22:52:36 +10:00
parent 67e43f4bc1
commit d3a6161978
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ namespace NeDvachAPI.Controllers
var supportedTypes = new[] { "jpg", "png" }; var supportedTypes = new[] { "jpg", "png" };
string receivedFileName = PostPicture.FileName; string receivedFileName = PostPicture.FileName;
string fileExt = receivedFileName.Substring((receivedFileName.Length) - 3, 3); string fileExt = receivedFileName.Substring((receivedFileName.Length) - 3, 3);
if (supportedTypes.Contains(fileExt)) //file type check if (supportedTypes.Contains(fileExt.ToLower())) //file type check
{ {
///Local Buffer File Part ///Local Buffer File Part
string filePath; string filePath;

View File

@ -11,8 +11,8 @@ builder.Services.AddCors(setup =>
setup.AddDefaultPolicy(policyBuilder => setup.AddDefaultPolicy(policyBuilder =>
{ {
policyBuilder.WithOrigins("http://www.vdk2ch.ru:4200").WithMethods("GET", "POST").WithHeaders("*"); //policyBuilder.WithOrigins("http://www.vdk2ch.ru:4200").WithMethods("GET", "POST").WithHeaders("*");
//policyBuilder.WithOrigins("http://localhost:4200").WithMethods("GET", "POST").WithHeaders("*"); policyBuilder.WithOrigins("http://localhost:4200").WithMethods("GET", "POST").WithHeaders("*");
}); });
}); });