Skip to content

Commit 1a91304

Browse files
committed
Moved documentation to wiki
1 parent 9dc787b commit 1a91304

File tree

2 files changed

+7
-46
lines changed

2 files changed

+7
-46
lines changed

README.md

+6-45
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,13 @@
22
Angular library that helps convert file (from input[type=file]) to base64/arrayBuffer/text using FileReader API.
33

44
# Installation
5+
`npm install --save fctrlx-angular-file-reader`
56

6-
1. `npm install --save fctrlx-angular-file-reader`
7-
2. add dependency to your project
8-
9-
```
10-
import { FctrlxAngularFileReader } from 'fctrlx-angular-file-reader';
11-
12-
@NgModule({
13-
...
14-
imports: [
15-
...,
16-
FctrlxAngularFileReader,
17-
]
18-
})
19-
```
20-
21-
**Enjoy!**
22-
23-
# Usage:
24-
`<input fileToBase64 type="file" [(files)]="fileModel">`
25-
26-
# Available Directives
27-
- `fileToBase64`
28-
- `fileToArrBuf`
29-
- `fileToText`
30-
31-
# Events and attributes.
32-
- `files` - your model that will be converted.
33-
- `type` - directives working only with type=file.
34-
- `multiple` - if you input is multiple - you will get in response array of files, in other case it will be an object.
35-
- `filesChange` - Event that calling when you select a file(s), usage: `<input fileToText type="file" [(files)]="fileModelText" (filesChange)="onTextChanges($event)">`
36-
37-
# Response
38-
```
39-
{
40-
name: string;//file name
41-
size: number;//file size
42-
type: string;//file type
43-
base64?: string;// base64 data
44-
text?: string;// text data
45-
arrBuf?: any;// array buffer data
46-
}
47-
```
48-
49-
# Full example:
50-
https://next.plnkr.co/edit/MlwNL3BKXdVtX3Xx?preview
7+
# [Documentation](https://github.com/facetrollex/fctrlx-angular-file-reader/wiki)
8+
# [Example](https://next.plnkr.co/edit/MlwNL3BKXdVtX3Xx)
519

5210
# Author
5311
_Alexey Khamitsevich_
12+
13+
# License
14+
_MIT_

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fctrlx-angular-file-reader",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "Angular library that helps convert file (from input[type=file]) to base64/arrayBuffer/text using FileReader API.",
55
"keywords": [
66
"angular",

0 commit comments

Comments
 (0)