fix(api): outpout filename as path - fixes #1227

This commit is contained in:
Julien Neuhart
2025-06-06 15:14:06 +00:00
parent b0a84bcbf7
commit aa58615650
4 changed files with 55 additions and 1 deletions

View File

@@ -513,7 +513,7 @@ func (ctx *Context) BuildOutputFile() (string, error) {
// OutputFilename returns the filename based on the given output path or the
// "Gotenberg-Output-Filename" header's value.
func (ctx *Context) OutputFilename(outputPath string) string {
filename := ctx.echoCtx.Request().Header.Get("Gotenberg-Output-Filename")
filename := ctx.echoCtx.Get("outputFilename").(string)
if filename == "" {
return filepath.Base(outputPath)