From 64b179ab0e6a66c0f8edb72ab24ef28bbc2f9969 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Mon, 24 Aug 2015 15:03:52 -0700 Subject: Fixes mm-1912 move get file info into its own web service call --- web/react/utils/utils.jsx | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'web/react/utils/utils.jsx') diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 4571312bb..1a4db5954 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -604,23 +604,6 @@ module.exports.splitFileLocation = function(fileLocation) { return {ext: ext, name: filename, path: filePath}; }; -// Asynchronously gets the size of a file by requesting its headers. If successful, it calls the -// provided callback with the file size in bytes as the argument. -module.exports.getFileSize = function(url, callback) { - var request = new XMLHttpRequest(); - - request.open('HEAD', url, true); - request.onreadystatechange = function onReadyStateChange() { - if (request.readyState === 4 && request.status === 200) { - if (callback) { - callback(parseInt(request.getResponseHeader('content-length'), 10)); - } - } - }; - - request.send(); -}; - module.exports.toTitleCase = function(str) { function doTitleCase(txt) { return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); -- cgit v1.2.3-1-g7c22