#alex-from-fuxam_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1299359156133953606
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
The invoice.invoice_pdf link isn't a direct link to the pdf that's why
It's a link to a webpage where you can download the pdf
There's not a direct link to download the pdf available
how could i programmatically download the invoice pdf?
We don't provide a way to do this currently
Oh actually hold on I'm mixing up the link we provide on the dashboard and invoice_pdf
invoice_pdf should directly download the file, but not sure offhand how to do this programatically
Let me see if it's possible actually
I recommend just sharing the link in invoice_pdf with them
That will be a direct link to download
Any reason you need to download the file to your server first?
We have a feature where clients can download files and save them to their own cloud service on our platform. We are dealing with large educational organizations that want to avoid saving files on their computer as much as possible, since this clutters their computer. This is why we offer them their own drive like a google drive for example.
In order to upload it therre, we first have to have the actual file. If we dont have this, they have to download it to their PC, upload it again to our drive and then delete the file and this would cause some inconvenience for them
Got it ok
Ok I was able to successfully request the file and write it locally in python at least
Are you trying to do this server-side?
This is client-side
Ok 302 code
Which is a redirect
Yeah the link isn't a direct link
Is doing this server-side an option?
Yes but if at all possible we would like to do this client-side.
Are we sure its gonna work server-side?
Wouldn't that also redirect?
I was able to do it server-side in python just now
I'm not a node guy, so I tested in python
via this approach: https://stackoverflow.com/a/58065117/17627350
I'll try this out. Can we keep the thread open while I do that?
Sure
@opaque grail checking in to see if you're all set here?
Hi, had a short delay because of a production bug, i picked this back up 5 mins ago