diff options
Diffstat (limited to 'app/assets/javascripts/ide/utils.js')
-rw-r--r-- | app/assets/javascripts/ide/utils.js | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/app/assets/javascripts/ide/utils.js b/app/assets/javascripts/ide/utils.js index 83a3d7f2ac3..3a42d7b3027 100644 --- a/app/assets/javascripts/ide/utils.js +++ b/app/assets/javascripts/ide/utils.js @@ -123,19 +123,6 @@ export function getPathParent(path) { return getPathParents(path, 1)[0]; } -/** - * Takes a file object and returns a data uri of its contents. - * - * @param {File} file - */ -export function readFileAsDataURL(file) { - return new Promise((resolve) => { - const reader = new FileReader(); - reader.addEventListener('load', (e) => resolve(e.target.result), { once: true }); - reader.readAsDataURL(file); - }); -} - export function getFileEOL(content = '') { return content.includes('\r\n') ? 'CRLF' : 'LF'; } |