0

I'm working on node.js express servers I'm stuck! Cant find the correct answer in documentation or somewhere else.

I need be able to:

  1. receive 2-3 PDF files at server A from client-side
  2. upload those files to server B
  3. make ZIP file from files on B server and save it to S3 bucket
  4. respond to server A with a link to ZIP file
  5. Save to DB at server A

All stages are not a problem for me except 2. Please help me.

How to upload files from req.files to another server with modules such as request or HTTP or anything else?

David Walschots
  • 12,279
  • 5
  • 36
  • 59
v.nikopolidi
  • 100
  • 3

1 Answers1

1

There is no particular difference from receiving files from the client on the server A and receiving files from server A on the server B. The code should be almost the same. So the only tricky part is sending files from A to B and it is covered quite well by the request.js documentation, especially its section "Streaming".

BTW, your question is not quite well match the rules of this site. See help for the details.

Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See http://SSCCE.org for guidance.

Community
  • 1
  • 1
Alex Netkachov
  • 13,172
  • 6
  • 53
  • 85