I
I
iogurt892015-10-29 20:45:53
JavaScript
iogurt89, 2015-10-29 20:45:53

How to save files to another server from Node.js application?

The situation is this. A photo comes from the browser to the server where Node.js is running. I need to save this photo. As I understand it, the most correct solution would be to save a link to this photo to the database, and send it to another server for storage.
So how do you send this photo to this server from a Node.js application?
I feel that everything is much simpler than it seems. But so far it's not entirely clear to me. Help me please.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex, 2015-10-29
@iogurt89

So what server do you want to save pictures to? If for some third-party service, then you need to deal with its API. If on a neighboring machine, then you can raise a simple HTTP interface there for accepting and saving files.

_
_ _, 2015-10-29
@AMar4enko

It seems to you that everything is easier than it seems. Typically, CDNs like Amazon S3 with a public API are used to store large amounts of media content.
Just for them, there are a large number of libraries that will do everything for you, and you will only have to bury the link somewhere.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question