feat(qrApi): added attachment header
Build and Push Docker image / build-and-push (push) Successful in 3m33s Details

added new header to api response to that the qr code can be downloaded
This commit is contained in:
Valentin Kolb 2024-03-27 20:07:30 +01:00
parent d7f3369e0a
commit ab44afa000
1 changed files with 1 additions and 0 deletions

View File

@ -102,6 +102,7 @@ func InitQRApi(app *pocketbase.PocketBase, e *core.ServeEvent) error {
}
// return qr code as svg
c.Response().Header().Set("Content-disposition", "attachment; filename=QR.svg")
return c.Stream(200, "image/svg+xml", io.Reader(&buffer))
}, apis.ActivityLogger(app))