1

hello i am trying to get full path of ken-do upload control in jquery but its showing only

c:/fakepath/ImageName.jpg 

so anyone can tell me how can i get full path of kendo upload in jquery. this is my jquery.

function onSelect(e) {
        alert("Select");
        var src = $("#files").val();
        var path = $("#files").attr("src");
        alert(src);
        alert(path);
    }

this is my kendo

 <div>
                    @(Html.Kendo().Upload()
                    .Name("files")
                    .Multiple(false)
                    .Messages(msg => msg.Select("Browser"))
                    //.Async(a=>a.AutoUpload(false).Save("Save","Imagetest"))
                    .Events(e => e
                    .Select("onSelect").Remove("onRemove"))
                    )
                </div>
Durgpal Singh
  • 9,789
  • 4
  • 35
  • 48

1 Answers1

2

In simple words, you cannot, at least not in all browsers. Due to security restrictions of browser you cannot get the actual file path on the disk.

Although there are some workarounds to get file path (through ActiveX, Silverlight etc), you may not be able to get consistent behavior.

ramiramilu
  • 16,834
  • 6
  • 47
  • 66