Skip to content

Commit

Permalink
⚠️ Deprecate streams .upload method option
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-dimitru committed Feb 4, 2021
1 parent 2f463b4 commit c27de71
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/client/fileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const defaultInsertOpts = {
meta: {},
isBase64: false,
transport: 'ddp',
streams: 'dynamic',
chunkSize: 'dynamic',
allowWebWorkers: true
};
Expand Down Expand Up @@ -45,7 +44,7 @@ Template.afFileUpload.onCreated(function () {

if (!this.collection) {
throw new Meteor.Error(404, `[meteor-autoform-files] No collection found by name "${this.data.atts.collection}"`,
`Collection's name is case-sensetive. Please, make sure you're using right collection name.`);
'Collection\'s name is case-sensetive. Please, make sure you\'re using right collection name.');
}

this.uploadTemplate = this.data.atts.uploadTemplate || null;
Expand All @@ -54,12 +53,6 @@ Template.afFileUpload.onCreated(function () {
this.insertConfig = Object.assign({}, defaultInsertOpts, this.data.atts.insertConfig || {});
delete this.data.atts.insertConfig;

if (!isNaN(this.insertConfig.streams)) {
this.insertConfig.streams = parseInt(this.insertConfig.streams);
} else if (this.insertConfig.streams !== 'dynamic') {
this.insertConfig.streams = 'dynamic';
}

if (!isNaN(this.insertConfig.chunkSize)) {
this.insertConfig.chunkSize = parseInt(this.insertConfig.chunkSize);
} else if (this.insertConfig.chunkSize !== 'dynamic') {
Expand Down

0 comments on commit c27de71

Please sign in to comment.