public async Task <ActionResult> uploadImageFile([FromForm] IFormFile file, string loc)
 {
     try
     {
         if (file == null)
         {
             return(null);
         }
         return(new JsonResult(await uploaderService.UploadImageFile(file, "INDEX", loc)));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Example #2
0
 public async Task <ActionResult> uploadImageFile([FromForm] IFormFile file, string FOLDER, string ROOT = null)
 {
     try
     {
         if (file == null)
         {
             return(null);
         }
         if (ROOT == null)
         {
             ROOT = "INDEX";
         }
         return(new JsonResult(await uploaderService.UploadImageFile(file, ROOT, FOLDER)));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }