Skip to content

How to get Full Path of Uploaded Images In Java Script

Vishal Shinde

Asked Dec 16, 2011, 6:47 PM EST1 answer
Share
LinkedInX
Hi Every One


    function getImgSize()
    {

    var id=document.getElementById("FileUpload1").value;  
    alert(id);
    var classimage= new Image();  
    classimage.src=id;
 
    alert(classimage.width);
    alert(classimage.height);
   

    }


  using this function i get width and height of Uploaded Images in Java Script it will work only Internet Explorer.


               but i need to get width and height of Uploaded Images in Mozilla FireFox how to get in Java Script

    and   also how to get full path of Uploaded images in jave Script

   i am using FileUpload Control of asp.net 



Plz Help Me

Thanks

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Senthilkumar
    0
    Hi,

    The IE allows us the take the entire path the select file in the file upload control.
    But the mozilla and chrome browsers are not allowed to take the entire path the selected file due the security reasons.

    We have to use the server side function to upload into the local server path and based on we have to do the any manipulations.

    Thanks,
    Senthil.
    0