Skip to content

Commit

Permalink
Merge pull request #3 from VeliovGroup/dev
Browse files Browse the repository at this point in the history
v1.0.5
  • Loading branch information
dr-dimitru committed Apr 17, 2015
2 parents 1b0e07a + d22cc0d commit 888f7bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .versions
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ [email protected]
[email protected]
[email protected]
[email protected]
ostrio:[email protected].4
ostrio:[email protected].5
ostrio:[email protected]
[email protected]
[email protected]
Expand Down
6 changes: 4 additions & 2 deletions files.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,14 @@ class Meteor.Files

fileReader.onload = (chunk) ->
onProgress and onProgress((currentChunk / chunksQty) * 100)
binary = chunk.srcElement or chunk.target
binary = binary.result

if chunksQty is 1
Meteor.call self.methodNames.MeteorFileWrite, chunk.srcElement.result, fileData, meta, first, chunksQty, currentChunk, randFileName, (error, data) ->
Meteor.call self.methodNames.MeteorFileWrite, binary, fileData, meta, first, chunksQty, currentChunk, randFileName, (error, data) ->
end error, data
else
Meteor.call self.methodNames.MeteorFileWrite, chunk.srcElement.result, fileData, meta, first, chunksQty, currentChunk, randFileName, (error, data)->
Meteor.call self.methodNames.MeteorFileWrite, binary, fileData, meta, first, chunksQty, currentChunk, randFileName, (error, data)->
if data.chunk <= chunksQty
currentChunk = data.chunk + 1
from = currentChunk * self.chunkSize
Expand Down
2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package.describe({
name: 'ostrio:files',
version: '1.0.4',
version: '1.0.5',
summary: 'Upload, Store and Download small and huge files to/from file system (FS) via DDP and HTTP',
git: 'https://github.com/VeliovGroup/Meteor-Files',
documentation: 'README.md'
Expand Down

0 comments on commit 888f7bc

Please sign in to comment.