Merge pull request #202 from ahDDD/master

fix a key error in docs
master
LianYue 8 years ago committed by GitHub
commit d1dc4baf80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -149,7 +149,7 @@ The backend should provide a `session_id` (to identify the upload) and a `end_of
In this phase we'll upload every chunk until all of them are uploaded. This step allows some failures in the backend, and will retry up to `maxRetries` times.
We'll send the `session_id`, `start_chunk` and `chunk` (the sliced blob - part of file we are uploading). We expect the backend to return `{ status: 'success' }`, we'll retry otherwise.
We'll send the `session_id`, `start_offset` and `chunk` (the sliced blob - part of file we are uploading). We expect the backend to return `{ status: 'success' }`, we'll retry otherwise.
Use the option `uploadBody` to add more parameters to the body of this request.

@ -44,6 +44,13 @@ export default class ChunkUploadHandler {
return this.file.size
}
/**
* Gets the file size
*/
get fileName () {
return this.file.name
}
/**
* Gets action (url) to upload the file
*/
@ -222,7 +229,8 @@ export default class ChunkUploadHandler {
body: Object.assign(this.startBody, {
phase: 'start',
mime_type: this.fileType,
size: this.fileSize
size: this.fileSize,
name: this.fileName
})
}).then(res => {
if (res.status !== 'success') {

Loading…
Cancel
Save