Skip to content

Commit 9aed689

Browse files
committed
v0.2.0, Add Put method, Upload speed
1 parent 334ec1a commit 9aed689

11 files changed

+3290
-149
lines changed

README.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
var FileUpload = require('vue-upload-component');
1616

1717
new Vue({
18-
template: '<file-upload action="/"></file-upload>',
18+
template: '<file-upload post-action="/post.method" put-action="/put.method"></file-upload>',
1919
components: {
2020
FileUpload: FileUpload
2121
}
@@ -27,7 +27,7 @@
2727
```js
2828
import FileUpload from 'vue-upload-component'
2929
new Vue({
30-
template: '<file-upload action="/"></file-upload>',
30+
template: '<file-upload post-action="/post.method" put-action="/put.method"></file-upload>',
3131
components: {
3232
FileUpload
3333
}
@@ -94,16 +94,16 @@ npm run build
9494
{
9595
files: [
9696
{
97-
id: 'String',
97+
id: 'String', // Read only
9898
name: 'filename String',
9999
size: 'filesize Number',
100-
progress: 'progress String',
100+
progress: 'progress String', // Read only
101+
speed: "Speed Number", // Read only
101102
active: 'active Boolean',
102103
error: 'error String',
103104
errno: 'errno String',
104-
success: 'success Boolean',
105-
data: 'Response data Object or String',
106-
105+
success: 'success Boolean', // Read only
106+
data: 'Response data Object or String', // Read only
107107
request: {
108108
headers: {
109109
"X-Csrf-Token": "xxxx",
@@ -112,10 +112,10 @@ npm run build
112112
"_csrf_token": "xxxxxx",
113113
},
114114
},
115-
116115
}
117116
],
118117

118+
119119
// Global
120120
request: {
121121
headers: {
@@ -125,11 +125,41 @@ npm run build
125125
"_csrf_token": "xxxxxx",
126126
},
127127
},
128+
129+
130+
active: false,
131+
132+
uploaded: true, // Read only
133+
134+
dropActive: false, // Read only
128135
}
129136
```
130137

131138

132139
### Props
133140
``` html
134-
<file-upload :title="Add upload files" :name="file" :action="./upload.php" :accept="accept" :multiple="multiple" :size="size" :timeout="3600000"></file-upload>
141+
<file-upload :title="Add upload files" :name="file" :drop="Boolean (true = $parent) or Element or Css Selector" :extensions="Array or String or Regular" :post-action="./post.method" :put-action="./put.method" :accept="accept" :multiple="multiple" :size="size" :timeout="3600000"></file-upload>
142+
```
143+
144+
```
145+
title="Add upload files"
146+
147+
name="post file name"
148+
149+
drop="Boolean (true = $parent) or Element or Css Selector"
150+
151+
extensions="Array or String or Regular" :post-action="./post.method"
152+
153+
post-action="./post.method"
154+
155+
put-action="./put.method"
156+
157+
accept="accept"
158+
159+
multiple="multiple"
160+
161+
size="max Size"
162+
163+
timeout="3600000"
164+
135165
```

0 commit comments

Comments
 (0)