我需要使用angularjs指令获取完整文件名, Bellow是我的代码,在这里我只获取文件名。是否有可能获得完整的文件名?如何使用AngularJs获取完整文件路径(图像文件)
<input type="file" fileread="justice.imageLocation" />
MyApp.directive('fileread', [function(){ return { scope: { fileread:"=" }, link: function (scope, element, attributes) { element.bind("change", function (changeEvent) { scope.$apply(function() { // I am getting file name here! scope.fileread = changeEvent.target.files[0].name; }); }); } } }]);
当你给出了一个答案,请加入一些信息,也可以什么是OP的代码中的实际问题。 – 2016-11-25 07:34:29