Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • this was the solution thank you. so if i want to upload several photo like an album it will be the same logic and process right ? Commented Jun 19, 2019 at 9:02
  • Yes, also you can use 'class' instead of 'id' in html form and script. Something like $('.ajax').each(function () { $(this).submit( todo ); }); Commented Jun 20, 2019 at 3:56
  • This answer is great, thank you shmakovpn. I was looking for this line " $('#photo').html('<img src="'+data.url+ '" />');". You saved me a lot of efforts. Commented May 7, 2020 at 3:16