file_worker.js (352B)
1 /** 2 * Expects a file. Returns an object containing the size, type, name and path. 3 */ 4 onmessage = function (event) { 5 var file = event.data; 6 7 var rtnObj = new Object(); 8 9 rtnObj.size = file.size; 10 rtnObj.type = file.type; 11 rtnObj.name = file.name; 12 rtnObj.path = file.path; 13 rtnObj.lastModified = file.lastModified; 14 15 postMessage(rtnObj); 16 };