public ActionResult UploadFile(IFormFile file, [FromQuery] int userid) { try { _photoManager.SavePhoto(file, userid); return(Ok()); } catch (Exception ex) { return(StatusCode(500, "Internal server error" + ex)); } }