mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-15 03:42:15 +01:00
adding filename form field + updating echo package to v4 (#57)
This commit is contained in:
27
build/docs/content/08-filename.md
Normal file
27
build/docs/content/08-filename.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: Filename
|
||||
---
|
||||
|
||||
All endpoints accept a form field named `filename`.
|
||||
|
||||
If provided, the API will return the resulting PDF file with the given filename.
|
||||
Otherwise a random filename is used.
|
||||
|
||||
> The Go and PHP libraries do not provide a way to set this form field.
|
||||
> However, you may hijack the response from the API or store the resulting PDF
|
||||
> using a custom filename.
|
||||
>
|
||||
> **Attention:** this feature does not work if a form field `webhookURL` is given.
|
||||
|
||||
## Examples
|
||||
|
||||
### cURL
|
||||
|
||||
```bash
|
||||
$ curl --request POST \
|
||||
--url http://localhost:3000/convert/html \
|
||||
--header 'Content-Type: multipart/form-data' \
|
||||
--form files=@index.html \
|
||||
--form filename='result.pdf' \
|
||||
-o result.pdf
|
||||
```
|
||||
Reference in New Issue
Block a user