diff --git a/index.html b/index.html
index b9ed6d77d..dbea93755 100644
--- a/index.html
+++ b/index.html
@@ -162,6 +162,10 @@
diff --git a/js/directives.js b/js/directives.js
index 9dd48091c..580434df8 100644
--- a/js/directives.js
+++ b/js/directives.js
@@ -75,5 +75,15 @@ angular.module('copay.directives')
}
}
})
-;
+ .directive('ngFileSelect',function() {
+ return {
+ link: function($scope, el) {
+ el.bind('change', function(e) {
+ $scope.file = (e.srcElement || e.target).files[0];
+ console.log('file directive', $scope.file);
+ $scope.getFile();
+ });
+ }
+ }
+ });