0

I want to upload a file from my server via form to another server.

Just like a normal upload form but the file is not stored at the client.

<form enctype="multipart/form-data" action="http://server2.com/upload.api">
<input type="file" name="file"> <!-- serverfile instead of local/client file ?! -->
<input type="submit">
</form>
  • 1
    Have you attempted to solve this problem? If you have, include your code and research in your question to show what hasn't worked for you. If not, you should attempt to solve it yourself first and then post the code and research here. It makes your question easier for others to answer too! – SuperBiasedMan Jul 20 '15 at 09:09
  • 1
    Hi and welcome to SO, I'd strongly recommend you to take the [tour](http://stackoverflow.com/tour) to get a better understanding of how to ask on SO :) – Epodax Jul 20 '15 at 09:10
  • http://stackoverflow.com/questions/11423682/cross-domain-form-posting maybe take a look here for your problem – donald123 Jul 20 '15 at 09:11
  • Thank you for your welcoming messages. Now i've read the tour, sorry for that. – Philip Meyerdierks Jul 21 '15 at 10:26

2 Answers2

0

as to be able to manipulate your file, i think its mandatory to first upload it to your web server.

Secondly you can use some php feature to perform a file upload to another server.

In my case i used ssh2, using the function scp-send to send my files to a remote server, then removing them from the web server. but here you will have an additional cost in setting this new feature that cannot be taken lightly.

spencer
  • 434
  • 4
  • 8
0

Thanks, I've finally managed to solve my problem via cURL