This commit is contained in:
parent
67e43f4bc1
commit
d3a6161978
@ -16,7 +16,7 @@ namespace NeDvachAPI.Controllers
|
||||
var supportedTypes = new[] { "jpg", "png" };
|
||||
string receivedFileName = PostPicture.FileName;
|
||||
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
|
||||
string filePath;
|
||||
|
@ -11,8 +11,8 @@ builder.Services.AddCors(setup =>
|
||||
setup.AddDefaultPolicy(policyBuilder =>
|
||||
{
|
||||
|
||||
policyBuilder.WithOrigins("http://www.vdk2ch.ru:4200").WithMethods("GET", "POST").WithHeaders("*");
|
||||
//policyBuilder.WithOrigins("http://localhost: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("*");
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user