From ec9c76c6be698cc45948219c8dddb6753138da14 Mon Sep 17 00:00:00 2001 From: LeviDing Date: Thu, 9 Apr 2020 11:29:51 +0800 Subject: [PATCH] Update article.md --- 4-binary/04-file/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/4-binary/04-file/article.md b/4-binary/04-file/article.md index 43c0ca58..20878b65 100644 --- a/4-binary/04-file/article.md +++ b/4-binary/04-file/article.md @@ -61,8 +61,8 @@ The main methods: The choice of `read*` method depends on which format we prefer, how we're going to use the data. -- `readAsArrayBuffer` - for binary files, to do low-level binary operations. For high-level operations, like slicing, `File` inherits from `Blob`, so we can call them directly, without reading. -- `readAsText` - for text files, when we'd like to get a string. +- `readAsArrayBuffer` -- for binary files, to do low-level binary operations. For high-level operations, like slicing, `File` inherits from `Blob`, so we can call them directly, without reading. +- `readAsText` -- for text files, when we'd like to get a string. - `readAsDataURL` -- when we'd like to use this data in `src` for `img` or another tag. There's an alternative to reading a file for that, as discussed in chapter : `URL.createObjectURL(file)`. As the reading proceeds, there are events: