javascript - How do I get a full URL in a image drop event -


i'm trying full url using getdata() after drop event of image:

function drop(e) {     e.stoppropagation();     e.preventdefault();      var url = e.datatransfer.getdata("url") || e.datatransfer.getdata("text/uri-list");     alert(url); ... } 

when drop image , capture event url = "http://localhost" , not include full url image. correct way capture full url dropped image?

thanks time.

as of writing there no way full path of uploaded file. file api does not provide full path name. specification says

the name of file; on getting, must return name of file string. there numerous file name variations on different systems; merely name of file, without path information.

so there no way can of now. done security concerns.

hope helps :)


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -