Exemplo n.º 1
0
        public static string Create(IFormFile file)
        {
            var imagePath = GetImagePath(file);
            var fullPath  = GetFullPath(file, imagePath);

            file.Create(fullPath);
            return(imagePath);
        }
Exemplo n.º 2
0
        public static string Update(IFormFile file, string existingPath)
        {
            File.Delete(existingPath);
            var imagePath = GetImagePath(file);
            var fullPath  = GetFullPath(file, imagePath);

            file.Create(fullPath);
            return(imagePath);
        }