So Im getting that same error from chrome everyone gets that doesn't allow same origin. I am running angular-4.x as localhost:4200. Im also running iss localhost:#####5. So I made a cors policy and enabled it. My IFormfile parameter keeps showing up as null when while debugging:
public async Task<IActionResult> Picload(IFormFile file)//---always null
so this was weird because when I checked the HttpContext to do further digging I found the my Image from angular in:
var file = _accessor.HttpContext.Request.Form.Files[0];
the accessor is using the singleton via startup and injected in the Controller Constructor so is this safe security wise and efficient. I am checking the file extentions. I feel like I finally beat chrome but have no clue what else Im conjuring by doing this.