SixLabors / ImageSharp.Web

:globe_with_meridians: High Performance Image Processing Middleware for ASP.NET- Core.
https://sixlabors.com/products/imagesharp-web/
Other
419 stars 102 forks source link

OnBeforeSaveAsync called only when there are available Commands which is not correct in some scenarios #316

Closed RosenPetrov closed 1 year ago

RosenPetrov commented 1 year ago

Prerequisites

ImageSharp.Web version

2.0.2

Other Six Labors packages and versions

NO

Environment (Operating system, version and so on)

Windows 11

.NET Framework version

net6

Description

In the Middleware there is a check which executes OnBeforeSaveAsync only when there are commands coming from the questing and this causes an issue where the metadata is not removed from images without query string.

Steps to Reproduce

I had a case when I wanted toremove the metadata from all of my images. So I made ImageSharp.Web intercepts all requests and added code in OnBeforeSaveAsync to remove the metadata.

However, in the Middleware there is a check which executes OnBeforeSaveAsync only when there are commands coming from the questing and this causes an issue where the metadata is not removed from images without query string.

Images

No response