#bschoeggl
1 messages · Page 1 of 1 (latest)
Hi there, can you share with me the invoice ID?
in_1O2y8AJxJIrs34m7lbleId5p
Ok, this invoice is finalized so you should be able to downlaod the pdf through its invoice_pdf.
Are you able to download the pdf if you directly open the invoice_pdf link in your browser?
Oh strange, it works from the browser but not curling it or hitting the url from our server
Any idea why that would be?
How does your server download the pdf?
When I curl or hit from server, I get a 200 but a zero byte response
axios.get(invoice.invoice_pdf)
Are there any settings that prevent your server from downloading a file?
Set responseType: 'blob' and try to downalod the file with axios again?
Can you send a curl that will work?
curl https://URL_TO_DOWNLAOD should just work, but since you are using axios to download the file, you should set set responseType to blob or stream. You can find example code in axios API reference: https://axios-http.com/docs/api_intro
curling directly responds with zero bytes
axios with responseType: 'blob' also doesn't work 😦
Can you try to perform a curl directly in your development machine?