adding filename form field + updating echo package to v4 (#57)

This commit is contained in:
Julien Neuhart
2019-03-26 17:35:38 +01:00
committed by GitHub
parent 8a4a043e9f
commit 871b52a288
21 changed files with 140 additions and 47 deletions

View 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
```