Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top