Commits

Matthew Schinckel committed 59e8d17

Removal of unused code.

Comments (0)

Files changed (1)

src/knockout.file.js

 
 // TODO: maybe allow for specifying the data that is required. (to save memory).
 
-$(function() {
-  var URL = window.URL || window.webkitURL;
-  
+$(function() {  
   ko.bindingHandlers.file = {
-    init: function(element, valueAccessor) {
+    init: function(element, valueAccessor, allBindingsAccessor) {
       var $element = $(element);
       var value = valueAccessor();
+      
       value.binaryString = ko.observable();
       value.text = ko.observable();
       value.arrayBuffer = ko.observable();
         read('arrayBuffer');
         read('dataURL');
       }
-      return;
-
-      if (bindings.fileObjectURL && ko.isObservable(bindings.fileObjectURL)) {
-        var oldUrl = bindings.fileObjectURL();
-        if (oldUrl) {
-          URL.revokeObjectURL(oldUrl);
-        }
-        bindings.fileObjectURL(file && URL.createObjectURL(file));
-      }
-
     }
   }
 });