|
@ -102,6 +102,10 @@ odoo.define('web_drop_target', function(require) { |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_file_reader_error_handler: function(e){ |
|
|
|
|
|
console.error(e); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
_handle_file_drop_attach: function( |
|
|
_handle_file_drop_attach: function( |
|
|
item, e, res_model, res_id, extra_data |
|
|
item, e, res_model, res_id, extra_data |
|
|
) { |
|
|
) { |
|
@ -111,6 +115,7 @@ odoo.define('web_drop_target', function(require) { |
|
|
reader.onloadend = self.proxy( |
|
|
reader.onloadend = self.proxy( |
|
|
_.partial(self._create_attachment, file, reader, e, res_model, res_id, extra_data) |
|
|
_.partial(self._create_attachment, file, reader, e, res_model, res_id, extra_data) |
|
|
); |
|
|
); |
|
|
|
|
|
reader.onerror = self.proxy('_file_reader_error_handler'); |
|
|
reader.readAsArrayBuffer(file); |
|
|
reader.readAsArrayBuffer(file); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|