private async Task InsertCategoryImageAsync(Category category, CancellationToken cancellationToken, int id) { var file = category.ImageUrl.Split("base64,")[1]; await _fileUtility.UploadFileAsync(@"Category/" + id, category.ImageName, file, cancellationToken); }
private async Task InsertManufacturerImageAsync(Manufacturer manufacturer, CancellationToken cancellationToken, int id) { var file = manufacturer.ImageUrl.Split("base64,")[1]; await _fileUtility.UploadFileAsync(@"Manufacturer/" + id, manufacturer.ImageName, file, cancellationToken); }
private async Task InsertProductImageAsync(ProductViewModel product, CancellationToken cancellationToken, ProductImage image) { var file = image.ImageUrl.Split("base64,")[1]; await _fileUtility.UploadFileAsync(@"ProductImage/" + product.Id, image.ImageName, file, cancellationToken); }