diff --git a/app.go b/app.go index 1dea4f1140..293f29ba0d 100644 --- a/app.go +++ b/app.go @@ -124,7 +124,8 @@ type App struct { // customConstraints is a list of external constraints customConstraints []CustomConstraint // sendfiles stores configurations for handling ctx.SendFile operations - sendfiles []*sendFileStore + sendfiles []*sendFileStore + // sendfilesMutex is a mutex used for sendfile operations sendfilesMutex sync.RWMutex } diff --git a/docs/api/ctx.md b/docs/api/ctx.md index ec72600dce..ba90392824 100644 --- a/docs/api/ctx.md +++ b/docs/api/ctx.md @@ -1689,10 +1689,6 @@ app.Get("/", func(c fiber.Ctx) error { Transfers the file from the given path. Sets the [Content-Type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) response HTTP header field based on the **filenames** extension. -:::caution -Compression is not enabled by default. You need to pass config and enable `Compress` option. -::: - ```go title="Config" title="Config" // SendFile defines configuration options when to transfer file with SendFile. type SendFile struct {