Google Cloud File into Node.js readFile
Can someone please let me know if there is any way I can access my file thats in my BuildShip storage and put it through Node.js’s readFile function via Buffer, path, etc. What im trying to do is use the output of readfile in an API call to upload a pdf to a remote notary company. From my knowledge, there’s no way to download the file locally via BuildShip’s nodes, then input that direct path into readFile. The solutions ive tried so far have resulted in infinite run times
Solution:Jump to solution
Hey @Meechie, you can try this out. Hopefully it gives you an idea of how you can do something like this. https://buildship.app/remix/238fcbd4-8c7c-4f7e-b83a-25cb64af221e
BuildShip - Visual backend workflow builder
Visually build workflows and powerful backend logic for your apps. Powered by AI, connect to anything with or without code.
10 Replies
BuildShip AI Support - Crafting Solution, (Avg response time: ~2 minutes 🙂)
@Gaurav Chadha any suggestions?
You can use the File Upload Trigger to store the file as a buffer storage buffer you can get the object of the file by creating a node with AI on your required usecase. You can refer to this documentation on how to use and upload files using the post request with Rest API File Upload Trigger - https://docs.buildship.com/trigger-nodes/file-upload#usage. Yes, currently there local download is not available through node, cc @Luis any suggestion to acomplish this?
Rest API File Upload – BuildShip
The Rest API File Upload Trigger is designed to handle incoming HTTP requests with multipart/form-data content type, which is commonly used for file uploads.
Solution
Hey @Meechie, you can try this out. Hopefully it gives you an idea of how you can do something like this. https://buildship.app/remix/238fcbd4-8c7c-4f7e-b83a-25cb64af221e
BuildShip - Visual backend workflow builder
Visually build workflows and powerful backend logic for your apps. Powered by AI, connect to anything with or without code.
Thank you for taking the time to work on this Luis!
When I went through the workflow, it happened to stall and run infinitely on the Get File Buffer node. I had also previously tried the download command as well and had the same loop output. What parameters/output did you get?
Do you have any other ideas for file processing into readFile()? Me and my business partner would really like to transition over from out other automation softwares if this can work. Would you guys also be open to a video call where we can go through our use case in more detail?
CC: @Gaurav Chadha
Hey, for the Get File Buffer node the only input is the path of the file to download from your BuildShip storage. Would you mind submitting an app-support so we can further investigate the issues you are facing in your workflow? We can also schedule meeting https://cal.com/rodge-buildship/30min
Thanks Luis. What time works best for you to meet? I had originally scheduled for 2pm EST, but it seems as though you are unavailable. Would later work?
Hi sorry I missed your message we can do anytime tomorrow.
No worries! Ive scheduled for 5:30pm est tomorrow. Let me know if that works for you!
Ok that’s perfect