Merge commit from fork

Co-authored-by: Jacob Brackett <jbrackett@makenotion.com>
This commit is contained in:
Julien Neuhart
2026-08-13 08:08:28 +02:00
committed by GitHub
parent 9ec7be4687
commit 91f2587fef
2 changed files with 65 additions and 0 deletions

View File

@@ -178,6 +178,12 @@ func newContext(echoCtx echo.Context, logger *slog.Logger, fs *gotenberg.FileSys
return nil, cancel, fmt.Errorf("get multipart form: %w", err)
}
defer func() {
err := form.RemoveAll()
if err != nil {
logger.ErrorContext(context.Background(), fmt.Sprintf("remove multipart temporary files: %s", err))
}
}()
// This will ensure we do not exceed the body limit.
var formValuesSize int64