Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top