> **The document uses Google Translate**
## Install
### npm install
``` bash
npm install vue-upload-component --save
```
``` js
const VueUploadComponent = require('vue-upload-component')
Vue.component('file-upload', VueUploadComponent)
```
### html install
``` html
```
## Usage
### Example
https://lian-yue.github.io/vue-upload-component/
### Example source code
https://github.com/lian-yue/vue-upload-component/tree/2.0/example
### html
```html
Vue-upload-component Test
- {{file.name}} - Error: {{file.error}}, Success: {{file.success}}
Upload file
```
### SSR (Server isomorphism)
```js
import FileUpload from 'vue-upload-component/src'
```
### webpack.config.js
```js
const nodeExternals = require('webpack-node-externals');
{
//.....
externals: [
nodeExternals({whitelist:[/^vue-upload-component/]})
]
//.....
}
```
***
## Props
### inputId
* **Type:** `String`
* **Default:** `this.name`
* **Description:**
The `id` attribute of the input tag
* **Usage:**
```html
```
### name
* **Type:** `String`
* **Default:** `file`
* **Description:**
The `name` attribute of the input tag
* **Usage:**
```html
```
### post-action
* **Type:** `String`
* **Default:** `undefined`
* **Description:**
`POST` Request upload URL
* **Usage:**
```html
```
### put-action
* **Type:** `String`
* **Default:** `undefined`
* **Description:**
`PUT` Request upload URL
`put-action` is not empty Please give priority to` PUT` request
Required `html5` support
* **Usage:**
```html
```
### headers
* **Type:** `Object`
* **Default:** `{}`
* **Description:**
Attach `header` data
Required `html5` support
* **Usage:**
```html
```
### data
* **Type:** `Object`
* **Default:** `{}`
* **Description:**
`POST request`: Append request `body`
`PUT request`: Append request `query`
* **Usage:**
```html
```
### value, v-model
* **Type:** `Array