Transfer of PDF file from node-red to some remote machine via API

Hi All,

Can anyone help me how to start with the below two requirement. that how to transfer a pdf file to some remote server/machine via API.

  1. The customer can send Prepress PDF-Package File via API to a machine
  2. The customer write Prepress PDF-Package File to customers SMB-Server and API will fetch this file and send it to machine.

Sudarshan Thakur

What is "a machine" - node red server? a file share? SMB / FTP?

What API will fetch & what does fetch mean (SMB file operation? HTTP request?). Is this the "something" you want to develop in node-red?

The process is a bit unclear.

NOTE: if it helps,

  • node-red can read into a buffer any file (so being a PDF is of no importance or consequence)
  • node-red can perform HTTP Requests like GET and POST etc

So start by going through the cookbook, try the examples, try to get the individual parts working then knit them together. When you get stuck, share your progress and ask specific questions & I am certain someone can help.

PS, if you are new to node-red, I also recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Thanks Steve,

But my requirement is to

  1. send a local pdf file to some remote server first by SMB server configuration.
  2. and then I have a API which will be fetching that pdf file (sent from local to remote smb server in first step) and sending it to my machine(some manufacturing machines).

So how to achieve this through node-red, Please help.

Sorry, but there is not enough information. I could certainly show you how to transmit a file from somewhere to somewhere but it will probably not be what you want. Also, stating you have an API is not even close to being enough detail.

Q1. Is this PDF file always named the same and always in the same location?
Q2. Does local mean local to a user or local to node-red?
Q3. Is this via a dashboard or web page?

Q4. So is this API to be used by node-red or will it be replaced by node-red?
Q5. What will tell node-red which machine to send the file to?
Q6. What is this API? Http/rest?
Q7. How does the file get to the machine (what transport)? FTP? Some custom protocol?

If you have an SMB connection then presumably you have mounted the drive on the node-red system, in which case the File node should be able to write it, or use a system command via an exec node to copy it to that drive.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.