Skip to content

Commit

Permalink
Merge pull request #178 from VeliovGroup/dev
Browse files Browse the repository at this point in the history
v1.6.9
 - Implement #177
  • Loading branch information
dr-dimitru authored Aug 3, 2016
2 parents 9b0d77b + 7638d61 commit d534cf9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .versions
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ [email protected]
[email protected]
[email protected]
ostrio:[email protected]
ostrio:[email protected].8
ostrio:[email protected].9
[email protected]
[email protected]
[email protected]
Expand Down
13 changes: 11 additions & 2 deletions files.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ class FilesCollection
# Basically it prepares everything
# So user can pause/disconnect and
# continue upload later, during `continueUploadTTL`
_methods[self._methodNames._Start] = (opts) ->
_methods[self._methodNames._Start] = (opts, returnMeta) ->
check opts, {
file: Object
fileId: String
Expand All @@ -839,13 +839,22 @@ class FilesCollection
fileLength: Number
}

check returnMeta, Match.Optional Boolean

console.info "[FilesCollection] [File Start Method] #{opts.file.name} - #{opts.fileId}" if self.debug
{result} = self._prepareUpload _.clone(opts), @userId, 'Start Method'
opts._id = opts.fileId
opts.createdAt = new Date()
self._preCollection.insert opts
self._createStream result._id, result.path, opts
return true

if returnMeta
return {
uploadRoute: "#{self.downloadRoute}/#{self.collectionName}/__upload"
file: result
}
else
return true


# Method used to write file chunks
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.6.8',
version: '1.6.9',
summary: 'Fast and robust file upload package, with support of FS, AWS, GridFS, DropBox or Google Drive',
git: 'https://github.com/VeliovGroup/Meteor-Files',
documentation: 'README.md'
Expand Down

0 comments on commit d534cf9

Please sign in to comment.