Skip to content

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

Closed
@RosenPetrov

Description

@RosenPetrov

Prerequisites

  • I have written a descriptive issue title
    I have verified that I am running the latest version of ImageSharp.Web
    I have verified if the problem exist in both DEBUG and RELEASE mode
    I have searched open and closed issues to ensure it has not already been reported

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @JimBobSquarePants@RosenPetrov

      Issue actions

        OnBeforeSaveAsync called only when there are available Commands which is not correct in some scenarios · Issue #316 · SixLabors/ImageSharp.Web