Update README.md
Just made some minor grammar changes
This commit is contained in:
committed by
Jimmy Wärting
parent
3e46b73052
commit
d87b419616
@@ -8,7 +8,7 @@ FileSaver.js
|
|||||||
|
|
||||||
FileSaver.js is the solution to saving files on the client-side, and is perfect for
|
FileSaver.js is the solution to saving files on the client-side, and is perfect for
|
||||||
web apps that generates files on the client, However if the file is coming from the
|
web apps that generates files on the client, However if the file is coming from the
|
||||||
server we recommend you to first try to use [Content-Disposition][8] attachment response header as it has more cross-browser compatible
|
server we recommend you to first try to use [Content-Disposition][8] attachment response header as it has more cross-browser compatiblity.
|
||||||
|
|
||||||
Looking for `canvas.toBlob()` for saving canvases? Check out
|
Looking for `canvas.toBlob()` for saving canvases? Check out
|
||||||
[canvas-toBlob.js][2] for a cross-browser implementation.
|
[canvas-toBlob.js][2] for a cross-browser implementation.
|
||||||
@@ -87,10 +87,10 @@ FileSaver.saveAs(blob, "hello world.txt");
|
|||||||
```js
|
```js
|
||||||
FileSaver.saveAs("https://httpbin.org/image", "image.jpg");
|
FileSaver.saveAs("https://httpbin.org/image", "image.jpg");
|
||||||
```
|
```
|
||||||
Using URLs within the same origin will just use `a[download]`
|
Using URLs within the same origin will just use `a[download]`.
|
||||||
Otherwise, it will first check if it supports cors header with a synchronously head request
|
Otherwise, it will first check if it supports cors header with a synchronous head request.
|
||||||
if it does it will download the data and save it using blob URLs
|
If it does, it will download the data and save using blob URLs.
|
||||||
if not it will try to download it using `a[download]`
|
If not, it will try to download it using `a[download]`.
|
||||||
|
|
||||||
The standard W3C File API [`Blob`][4] interface is not available in all browsers.
|
The standard W3C File API [`Blob`][4] interface is not available in all browsers.
|
||||||
[Blob.js][5] is a cross-browser `Blob` implementation that solves this.
|
[Blob.js][5] is a cross-browser `Blob` implementation that solves this.
|
||||||
@@ -108,10 +108,10 @@ Note: The standard HTML5 `canvas.toBlob()` method is not available in all browse
|
|||||||
|
|
||||||
### Saving File
|
### Saving File
|
||||||
|
|
||||||
You can save a File constructor without specifying a filename. The
|
You can save a File constructor without specifying a filename. If the
|
||||||
File itself already contains a name, There is a hand full of ways to get a file
|
file itself already contains a name, there is a hand full of ways to get a file
|
||||||
instance (from storage, file input, new constructor, clipboard event)
|
instance (from storage, file input, new constructor, clipboard event).
|
||||||
But if you still want to change the name, then you can change it in the 2nd argument
|
If you still want to change the name, then you can change it in the 2nd argument.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// Note: Ie and Edge don't support the new File constructor,
|
// Note: Ie and Edge don't support the new File constructor,
|
||||||
|
|||||||
Reference in New Issue
Block a user