You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am receiving a 404 error whenever I attempt to download an asset from the URLs provided after creating a postcard.
I have tried using request, node-fetch, axios, and the standard https package in node. My goal is to download the assets (postcard thumbnails and the PDF proof) and upload them to an AWS S3 bucket. I would like to stream the response from the GET request to the PUT so I do not need to store the files on disk temporarily.
Is there any advice on how I can get this to work? I have no issues when using Postman, but for some reason, I am getting 404s when attempting from my server-side node application.
The text was updated successfully, but these errors were encountered:
@cody-lettau thanks for opening up an issue, I can see how this can be frustrating. I see you've closed the issue so hopefully you've managed to resolve the issue; if you haven't, here's a little bit more information about our rendering process.
Our rendering pipeline is asynchronous; while we return a signed URL to the location the asset will ultimately live at it may not have been generated by the time you fetch. Typically we see our rendering process take about 1-2 seconds although a few edge cases might cause our process to take longer. The best way to know when the assets have been rendered is to listen to our webhook events. We send a postcard.rendered_pdf event for each postcard once it's been successfully rendered. A less complex solution that might fail in some edge cases is to wait 2-3 seconds after you receive the response from Lob's API to download the assets. This is why Postman seems to work, the manual steps take long enough for our rendering process to finish by the time you download the asset.
@dmlittle - Thanks for the quick response! The asynchronous rendering was what was throwing me off. I ended up implementing a timeout for now, but I do plan to switch over to use the webhook in the future as that would be cleaner.
Again, thanks for the quick reply. I literally just got it all working a few hours ago!
I am receiving a 404 error whenever I attempt to download an asset from the URLs provided after creating a postcard.
I have tried using request, node-fetch, axios, and the standard https package in node. My goal is to download the assets (postcard thumbnails and the PDF proof) and upload them to an AWS S3 bucket. I would like to stream the response from the GET request to the PUT so I do not need to store the files on disk temporarily.
Is there any advice on how I can get this to work? I have no issues when using Postman, but for some reason, I am getting 404s when attempting from my server-side node application.
The text was updated successfully, but these errors were encountered: