feat(chromium): split filenames can be controlled with the Gotenberg-Output-Filename header - closes #1130

This commit is contained in:
Julien Neuhart
2025-05-20 14:14:05 +02:00
parent 1d8630810b
commit f75912033e
5 changed files with 210 additions and 0 deletions

View File

@@ -409,6 +409,13 @@ func (ctx *Context) GeneratePath(extension string) string {
return fmt.Sprintf("%s/%s%s", ctx.dirPath, uuid.New().String(), extension)
}
// GeneratePathFromFilename generates a path within the context's working
// directory, using the given filename (with extension). It does not create
// a file.
func (ctx *Context) GeneratePathFromFilename(filename string) string {
return fmt.Sprintf("%s/%s", ctx.dirPath, filename)
}
// CreateSubDirectory creates a subdirectory within the context's working
// directory.
func (ctx *Context) CreateSubDirectory(dirName string) (string, error) {