diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2023-06-05 17:11:36 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2023-06-05 17:11:36 +0300 |
commit | 480faae00b0d5ab545506e81d744be781059f8bb (patch) | |
tree | 7e6356a05a92e8d88a7c7a847091dd5834b8cc48 /Controllers | |
parent | 0f5cbb4d87388f6490915a53a2e83c9b93961c25 (diff) |
Resize image on Upload
Diffstat (limited to 'Controllers')
-rw-r--r-- | Controllers/ProductsController.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Controllers/ProductsController.cs b/Controllers/ProductsController.cs index 79b4efd..9c1cdd2 100644 --- a/Controllers/ProductsController.cs +++ b/Controllers/ProductsController.cs @@ -88,8 +88,8 @@ namespace MyDarling.Controllers { Directory.CreateDirectory(directoryPath); } - using var fileStream = new FileStream(fullPath, FileMode.Create); - await file.CopyToAsync(fileStream); + + resizer.WriteResized(file, fullPath); } if (!string.IsNullOrEmpty(fullPath)) |