mardi 4 août 2015

Upload image with JavaScript from another server via AJAX

I'm trying (if it's possible) to make an upload of an image stored on another site (not on computer) via JavaScript (jQuery allowed) with an AJAX request.

Lets say that we have the image http://ift.tt/1rCW4Fp. I need to make an AJAX request, submiting this image to http://ift.tt/1M7kZe8.

  • I can't edit the file process.php to accept anything than a valid uploaded file.
  • Browser support is not important.

Is this even possible ? Because of security issues we canțt dynamicaly populate a file field, so maybe the is another way to send the file without having the user to select the file.

I think I should use FormData, not sure.

Aucun commentaire:

Enregistrer un commentaire