feat(qrApi): added attachment header
Build and Push Docker image / build-and-push (push) Successful in 3m33s
Details
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:
parent
d7f3369e0a
commit
ab44afa000
|
@ -102,6 +102,7 @@ func InitQRApi(app *pocketbase.PocketBase, e *core.ServeEvent) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// return qr code as svg
|
// 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))
|
return c.Stream(200, "image/svg+xml", io.Reader(&buffer))
|
||||||
}, apis.ActivityLogger(app))
|
}, apis.ActivityLogger(app))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue