T
T
TERMIK2011-11-28 01:04:11
Python
TERMIK, 2011-11-28 01:04:11

Transferring data from server to server?

Good day to all! Faced such problem:
There is an architecture "Client-Server-Server-Client". I am sending some file (text or .jpg) from the client to the server and I need to somehow transfer this file to another server. Can you tell me how to do it? Thanks in advance.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Anatoly, 2011-11-28
@taliban

And you can, as usual, send a post request from server to server and you don’t have to redo or finish anything.

I
int03e, 2011-11-28
@int03e

REST service? Then you can put the PUT file with a request. Here is an example code to upload to Amazon . It's in php, but the idea is the same.

R
reno, 2011-11-28
@reno

- If you only need to put a file on the second server, then you can simply mount the directory via nfs.
- If data processing is also important on the second server, then you can use soap / xml-rpc

0
0xA0, 2011-11-28
@0xA0

If I understand the question correctly, then it is possible to implement the client part on the server through sockets. form an HTTP request with a picture that came to the server and send it to another address. If interested, I can share the code (in PHP).

G
giggigi, 2011-11-28
@gigigi

You can send the image as base64 or send the URL with the image to the server and pick it up with curl

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question