Submit image in a <form> to a different domain?
I've got a web project where my users signup at a url like:
www.mysite.com/signup/index.jsp
after the user signs up, I show them another page where they can submit a user photo if they want. But my user photos are going to be hosted at another domain I own - is it possible to post a form to another domain? Like the page they land at is here with the following form:
<!--
www.mysite.com/signup/photo.jsp
-->
<form method="POST" action="http://www.myothersite.com/photo.php" >
</form>
I'd ideally like to get the image the user selects to just go to my other domain, where I'll host it statically.开发者_StackOverflow社区 Not sure if something like this is possible due to browser restrictions,
Thanks
is it possible to post a form to another domain
Sure, no problem. There are no cross-domain restrictions, and no single origin policy, for HTML forms.
精彩评论