我需要使用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