promisefilereader.js

Usage

Download

Latest

HTML

<script src="https://jc3213.github.io/promisefilereader.js/filereader.js"></script>

TamperMonkey

// @require https://jc3213.github.io/promisefilereader.js/filereader.js

Syntax

let promisedReader = new PromiseFileReader();

Method

text

let testResult = promisedReader.text(file);

json

let jsonResult = promisedReader.json(file);

dataURL

let dataResult = promisedReader.dataURL(file);

base64

let base64Result = promisedReader.base64(file);

arrayBuffer

let bufferResult = promisedReader.arrayBuffer(file);

binaryString

let binaryResult = promisedReader.binaryString(file);