Hi All,
I’m trying to download invoice PDF file trough API, but always I get a HTML file with 140kb size.
I can create invoices (curl -X POST 192.168.1.10/api/v1/invoices …)
I can list invoices (curl -X GET 192.168.1.10/api/v1/invoices …)
But when I try to download an invoice (curl -X GET 192.168.1.10/api/v1/download/1) the only thing I get, is a HTML file where is written “Oops something goes wrong”. Without any error anywhere.
I’ve found on your on your Github issues a suggestion, that I get download PDF with GET request and invitation code, eg: 192.168.1.10/download/{invitation_key}
I have tried, but downloaded file is a corrupt PDF file with same 140kb size.
In the same time the URL with invitation to view invoices works fine (192.168.1.10/view/{invitation_key})
Yes, I have something like this
"[2016-08-12 20:24:36] production.ERROR: exception ‘Symfony\Component\Debug\Exception\FatalErrorException’ with message ‘Call to undefined function Illuminate\View\Compilers\token_get_all()’ in /var/www/ninja/bootstrap/cache/compiled.php:15485 Stack trace: #0 {main} [] []
"
There is no error on my Apache too, and this is normal because I get HTTP 200 response, but the content is wrong.
And why another API are working, and only this download is broken ?
I have tried to download the pdf from 192.168.1.10/view/{invitation_key}, but my knowledge of JS is not so good, so the problem is still active.