Skip to content

Commit

Permalink
Merge pull request #356 from VeliovGroup/dev
Browse files Browse the repository at this point in the history
v1.7.11
  • Loading branch information
dr-dimitru authored Feb 15, 2017
2 parents 0623298 + b92977c commit 25c7123
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .versions
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ [email protected]
[email protected]
[email protected]
ostrio:[email protected]
ostrio:[email protected].10
ostrio:[email protected].11
[email protected]
[email protected]
[email protected]
Expand Down
16 changes: 11 additions & 5 deletions files.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ class FilesCollection
self._currentUploads[doc._id].end()

unless doc.isFinished
console.info "[FilesCollection] [_preCollectionCursor.observe] [removeUnfinishedUpload]: #{doc.file.path}" if self.debug
console.info "[FilesCollection] [_preCollectionCursor.observe] [removeUnfinishedUpload]: #{doc._id}" if self.debug
self._currentUploads[doc._id].abort()

delete self._currentUploads[doc._id]
Expand Down Expand Up @@ -799,8 +799,11 @@ class FilesCollection
if request.headers['x-eof'] is '1'
opts.eof = true
else
if typeof Buffer.from == 'function'
opts.binData = Buffer.from body, 'base64'
if typeof Buffer.from is 'function'
try
opts.binData = Buffer.from body, 'base64'
catch e
opts.binData = new Buffer body, 'base64'
else
opts.binData = new Buffer body, 'base64'
opts.chunkId = parseInt request.headers['x-chunkid']
Expand Down Expand Up @@ -977,8 +980,11 @@ class FilesCollection
}

if opts.binData
if typeof Buffer.from == 'function'
opts.binData = Buffer.from opts.binData, 'base64'
if typeof Buffer.from is 'function'
try
opts.binData = Buffer.from opts.binData, 'base64'
catch e
opts.binData = new Buffer opts.binData, 'base64'
else
opts.binData = new Buffer opts.binData, 'base64'

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.7.10',
version: '1.7.11',
summary: 'Upload files via DDP, HTTP and WebRTC/DC. To server FS, AWS, GridFS, DropBox or Google Drive.',
git: 'https://github.com/VeliovGroup/Meteor-Files',
documentation: 'README.md'
Expand Down

0 comments on commit 25c7123

Please sign in to comment.