javascript - Upload image from URL using AJAX just like StackOverflow does? -


I am creating a project management module for SUGRMM and a part of my module is made up of the entire discussion forum. .

Now when a user creates a new topic post or post reply, then I would like a button to add an image, then the user will be allowed to upload an image and post the URL of the uploaded image , It will also allow them to input the URL of an image and then upload it to our server and enter the URL as it was uploaded from the computer.

Basically 2 examples that work exactly like I need GMAIL and StackOverflow. I illustrate the picture examples given below if it is in action on both sites.

I've got a great AJAX upload script so I think how will I need to create a model window that is the uploader and after that tab which allows them to input a URL At the point I need to trigger an upload with the URL and then put it in my tetherera.

Do anyone have any examples of this kind or library's address which does this already?

Enter image details here

This code uses jQuery to load the image from the URL. Get properties from URL:

html

  & lt; Div id = "picture" & gt; & Lt; / Div & gt;  

jQuery

  var img = new image (); Img.src = urlimg; $ ("#Photo") enclosed (img). Img.onload = function () {warning (img.width); }  

Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

java - Algorithm negotiation fail SSH in Jenkins -