From 0f99f5595f6a9510a27f96a30ece5f2a2906c453 Mon Sep 17 00:00:00 2001 From: Kaczka Zniszczenia Date: Wed, 22 Feb 2017 09:41:14 +0100 Subject: [PATCH 1/5] setTokenCookie() on Meteor.startup Edge doesn't trigger Accounts.onLogin on page reload. Using Meteor.startup to fix issue. --- files.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files.coffee b/files.coffee index ee1fbdc0..a945f2fe 100755 --- a/files.coffee +++ b/files.coffee @@ -566,6 +566,9 @@ class FilesCollection return if Accounts? + Meteor.startup -> + setTokenCookie() + return Accounts.onLogin -> setTokenCookie() return From 5555f2b0336d9bd12e75d7d566c8dfef406e8931 Mon Sep 17 00:00:00 2001 From: s-ol Date: Tue, 21 Feb 2017 18:18:22 +0100 Subject: [PATCH 2/5] reapply type-detection logic during 'finish' Close #361 --- files.coffee | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/files.coffee b/files.coffee index ee1fbdc0..f5b91f36 100755 --- a/files.coffee +++ b/files.coffee @@ -1090,6 +1090,7 @@ class FilesCollection self = @ result.type = @_getMimeType opts.file result.public = @public + @_updateFileTypes result @collection.insert _.clone(result), (error, _id) -> if error @@ -1216,6 +1217,22 @@ class FilesCollection else return { ext: '', extension: '', extensionWithDot: '' } + ### + @locus Anywhere + @memberOf FilesCollection + @name _updateFileTypes + @param {Object} data - File data + @summary Internal method. Classify file based on 'type' field + ### + _updateFileTypes: (data) -> + data.isVideo = /^video\//i.test data.type + data.isAudio = /^audio\//i.test data.type + data.isImage = /^image\//i.test data.type + data.isText = /^text\//i.test data.type + data.isJSON = /application\/json/i.test data.type + data.isPDF = /application\/pdf|application\/x-pdf/i.test data.type + return + ### @locus Anywhere @memberOf FilesCollection @@ -1239,14 +1256,9 @@ class FilesCollection size: data.size type: data.type extension: data.extension - isVideo: /^video\//i.test data.type - isAudio: /^audio\//i.test data.type - isImage: /^image\//i.test data.type - isText: /^text\//i.test data.type - isJSON: /application\/json/i.test data.type - isPDF: /application\/pdf|application\/x-pdf/i.test data.type _downloadRoute: data._downloadRoute or @downloadRoute _collectionName: data._collectionName or @collectionName + @_updateFileTypes ds ds._storagePath = data._storagePath or @storagePath(_.extend(data, ds)) return ds From 88319e2907890899d323688249d4f931e884d452 Mon Sep 17 00:00:00 2001 From: s-ol Date: Tue, 21 Feb 2017 18:37:21 +0100 Subject: [PATCH 3/5] stricter isPDF and isJSON regexes --- files.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files.coffee b/files.coffee index f5b91f36..db2f895d 100755 --- a/files.coffee +++ b/files.coffee @@ -1229,8 +1229,8 @@ class FilesCollection data.isAudio = /^audio\//i.test data.type data.isImage = /^image\//i.test data.type data.isText = /^text\//i.test data.type - data.isJSON = /application\/json/i.test data.type - data.isPDF = /application\/pdf|application\/x-pdf/i.test data.type + data.isJSON = /^application\/json$/i.test data.type + data.isPDF = /^application\/(x-)?pdf$/i.test data.type return ### From bf0973aaa72a377f20725d21c2c3400b7479c126 Mon Sep 17 00:00:00 2001 From: "dr.dimitru" Date: Wed, 1 Mar 2017 17:16:46 +0300 Subject: [PATCH 4/5] Missed GCAA logo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 931fac57..9e62609c 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ All PRs is always welcome on [`dev` branch](https://github.com/VeliovGroup/Meteo Awards: ======== - + Demo application: From 3002eeb895dd1089d70e4546b35a0b041aab79c7 Mon Sep 17 00:00:00 2001 From: "dr.dimitru" Date: Wed, 1 Mar 2017 17:20:45 +0300 Subject: [PATCH 5/5] v1.7.12 - Merge #363 , closing #360 by @Kaczkazniszczenia - Merge #362 , closing #361 by @s-ol - Compatibility with `meteor@1.4.3.1` - Dependencies update --- .versions | 78 +++++++++++++++++++++++++++--------------------------- package.js | 2 +- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.versions b/.versions index 2a2342b3..16c3b3d7 100644 --- a/.versions +++ b/.versions @@ -1,52 +1,52 @@ allow-deny@1.0.5 -babel-compiler@6.9.0 -babel-runtime@0.1.10 -base64@1.0.9 -binary-heap@1.0.9 +babel-compiler@6.14.1 +babel-runtime@1.0.1 +base64@1.0.10 +binary-heap@1.0.10 blaze@2.1.8 blaze-tools@1.0.9 -boilerplate-generator@1.0.9 -caching-compiler@1.1.6 -callback-hook@1.0.9 -check@1.2.3 -coffeescript@1.2.3 +boilerplate-generator@1.0.11 +caching-compiler@1.1.9 +callback-hook@1.0.10 +check@1.2.4 +coffeescript@1.11.1_3 ddp@1.2.5 -ddp-client@1.2.9 -ddp-common@1.2.6 -ddp-server@1.2.10 +ddp-client@1.3.3 +ddp-common@1.2.8 +ddp-server@1.3.13 deps@1.0.12 -diff-sequence@1.0.6 -ecmascript@0.5.7 -ecmascript-runtime@0.3.12 -ejson@1.0.12 -geojson-utils@1.0.9 +diff-sequence@1.0.7 +ecmascript@0.6.3 +ecmascript-runtime@0.3.15 +ejson@1.0.13 +geojson-utils@1.0.10 html-tools@1.0.10 htmljs@1.0.10 -http@1.2.8 -id-map@1.0.8 -jquery@1.11.9 -logging@1.1.14 -meteor@1.2.16 -minimongo@1.0.17 -modules@0.7.5 -modules-runtime@0.7.5 -mongo@1.1.10 -mongo-id@1.0.5 -npm-mongo@1.5.45 -observe-sequence@1.0.12 -ordered-dict@1.0.8 +http@1.2.11 +id-map@1.0.9 +jquery@1.11.10 +logging@1.1.17 +meteor@1.6.1 +minimongo@1.0.20 +modules@0.7.9 +modules-runtime@0.7.9 +mongo@1.1.15 +mongo-id@1.0.6 +npm-mongo@2.2.16_1 +observe-sequence@1.0.15 +ordered-dict@1.0.9 ostrio:cookies@2.1.3 -ostrio:files@1.7.11 -promise@0.8.3 +ostrio:files@1.7.12 +promise@0.8.8 random@1.0.10 -reactive-var@1.0.10 -retry@1.0.8 -routepolicy@1.0.11 +reactive-var@1.0.11 +retry@1.0.9 +routepolicy@1.0.12 spacebars@1.0.12 spacebars-compiler@1.0.12 -tracker@1.1.0 +tracker@1.1.2 ui@1.0.11 -underscore@1.0.9 -url@1.0.10 -webapp@1.3.10 +underscore@1.0.10 +url@1.1.0 +webapp@1.3.13 webapp-hashing@1.0.9 diff --git a/package.js b/package.js index a4daf213..39cd6c91 100755 --- a/package.js +++ b/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ostrio:files', - version: '1.7.11', + version: '1.7.12', 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'