示例#1
0
        public static string Create(IFormFile file)
        {
            var imagePath = GetImagePath(file);
            var fullPath  = GetFullPath(file, imagePath);

            file.Create(fullPath);
            return(imagePath);
        }
示例#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);
        }