Domanda

I would like to send file(s) with xhr from the user browser to remote FTP server without saving file to my server.

Is it possible? How can I do it? I am using PHP backend.

È stato utile?

Soluzione

I'd start with an ajax upload script. I'm sure you can find one already written. Carefully read it and stop at the point where there is a temporary file on your server. (I know, technically this violates one of your specifications, but it's only temporary) Then use ftp_put() to upload it. Then delete the temp file or just let it die on it's own.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top