fix image upload corruption (#1569)

This commit is contained in:
Jason Dove
2024-01-23 10:49:19 -06:00
committed by GitHub
parent a67a6047c1
commit 6f49233864
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -37,6 +37,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Ignore errors deleting old HLS segments; this should improve stream reliability - Ignore errors deleting old HLS segments; this should improve stream reliability
- Update show year when changed within Plex - Update show year when changed within Plex
- Fix crop scale behavior with NVIDIA, QSV acceleration - Fix crop scale behavior with NVIDIA, QSV acceleration
- Fix bug that corrupted uploaded images (watermarks, channel logos)
- Re-uploading images should fix them
### Changed ### Changed
- Upgrade from .NET 7 to .NET 8 - Upgrade from .NET 7 to .NET 8
@@ -40,6 +40,9 @@ public class ImageCache : IImageCache
// ReSharper disable once UseAwaitUsing // ReSharper disable once UseAwaitUsing
using (var fs = new FileStream(tempFileName, FileMode.OpenOrCreate, FileAccess.Write)) using (var fs = new FileStream(tempFileName, FileMode.OpenOrCreate, FileAccess.Write))
{ {
// overwrite anything that's already there
fs.SetLength(0);
await stream.CopyToAsync(fs); await stream.CopyToAsync(fs);
} }