fix image upload corruption (#1569)
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user