Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Danial Farid authored and Danial Farid committed Dec 24, 2015
2 parents adf0f28 + 1d6e356 commit 81c39a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ On your server you need to keep track of what files are being uploaded and how m
set that back to zero to allow re-uploading the same file.
* Optionally you can specify `resumeChunkSize` to upload the file in chunks to the server. This will allow uploading to GAE or other servers that have
file size limitation and trying to upload the whole request before passing it for internal processing.<br/>
If this option is set the requests will have three extra fields:
`_chunckSize`, `_chunkNumber` (zero starting), and `_totalSize` to help the server to write the uploaded chunk to
If this option is set the requests will have the following extra fields:
`_chunkSize`, `_currentChunkSize`, `_chunkNumber` (zero starting), and `_totalSize` to help the server to write the uploaded chunk to
the correct position.
Uploading in chunks could slow down the overall upload time specially if the chunk size is too small.

Expand Down
3 changes: 2 additions & 1 deletion src/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http,
slice.name = file.name;
slice.ngfName = file.ngfName;
if (config._chunkSize) {
formData.append('_chunkSize', config._end - config._start);
formData.append('_chunkSize', config._chunkSize);
formData.append('_currentChunkSize', config._end - config._start);
formData.append('_chunkNumber', Math.floor(config._start / config._chunkSize));
formData.append('_totalSize', config._file.size);
}
Expand Down

0 comments on commit 81c39a1

Please sign in to comment.