How to upload image from client side by using link we can download it?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sandipkumar
    New Member
    • Jan 2011
    • 2

    #1

    How to upload image from client side by using link we can download it?

    Code:
     function UploadImage() 
    {
        var imgRe = /^.+\.(jpg|jpeg|gif|png|bmp|tif|JPG|JPEG|GIF|PNG|BMP|TIF)$/i;
        document.getElementById("file1").click();
        var path = document.getElementById("file1").value;
        var size = (document.fileSize)*1;
        var y = document.images;
        var imglength = 0;
            if (path != "" && path.search(imgRe) != -1)
            { 
                document.src = 'file://'+path;
                {
                    var img = new Image();
                    img.src = 'file://'+path;
                    for (i=0;i<y.length;i++)
                    {
                        imglength += (y[i].fileSize)*1;
                    }
                }
                
                    document.getElementById("ctl00_ContentPlaceHolder1_HideFileName").value = path;
                    document.getElementById("ctl00_ContentPlaceHolder1_imgPhoto").setAttribute("src",path);
               
               
                   
           }
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #2
    Hello Sandipkumar,

    All that you posted was your code. No question or explanation of what the code is. You have not provided full details towards your question.

    Please take some time and provide us with more detail as to what your trying to do and the problem your encountering.

    Happy programming,
    CroCrew~

    Comment

    Working...