From cbbdb780eb466b53a4476e599f5bd73dad3a79db Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 11 Dec 2014 11:18:03 +0100 Subject: [PATCH 01/10] change misspelled utils-name --- cfs-autoform-util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cfs-autoform-util.js b/cfs-autoform-util.js index 6df9899..0fa2a0d 100644 --- a/cfs-autoform-util.js +++ b/cfs-autoform-util.js @@ -2,12 +2,12 @@ Util = { //delete prop from obj //prop can be something like "obj.3.badprop deepDelete: function(obj, prop){ - return Utilities.deepDo(obj, prop, function(obj, prop){ + return Util.deepDo(obj, prop, function(obj, prop){ delete obj[prop]; }); }, deepSet: function(obj, prop, value){ - return Utilities.deepDo(obj, prop, function(obj, prop){ + return Util.deepDo(obj, prop, function(obj, prop){ obj[prop] = value; }); }, From f1bd4a5f0e45d4d479f37680fa16a28b9c22689d Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 11 Dec 2014 11:20:53 +0100 Subject: [PATCH 02/10] updated --- cfs-autoform-hooks.js | 315 +++++++++++++++++++++++++----------------- cfs-autoform.js | 7 +- versions.json | 14 +- 3 files changed, 200 insertions(+), 136 deletions(-) diff --git a/cfs-autoform-hooks.js b/cfs-autoform-hooks.js index 0baa6e1..ace8894 100644 --- a/cfs-autoform-hooks.js +++ b/cfs-autoform-hooks.js @@ -1,152 +1,215 @@ -Hooks = { - beforeInsert: function (doc, template) { - var self = this; - if (!AutoForm.validateForm(this.formId)) { - return false; +var beforeHook = function (docOrModifier, template, docId) { + if(docId!=null) + { + var isUpdate = true; + // Util.deepFind uses a path to find if the key is set + // In the update-case, the key is nested in the $set-object + // we therefore introduce a helperVariable: + var docData = docOrModifier['$set']; + } + else + { + var isUpdate = false; + var docData = docOrModifier; + } + var self = this; + if (!AutoForm.validateForm(this.formId)) { + return false; + } + + + // Loop through all hidden file inputs in the form. + var totalFiles = 0; + var arrayFields = {}; + template.$('.cfsaf-hidden').each(function () { + var elem = $(this); + + // Get schema key that this input is for + var key = elem.attr("data-schema-key"); + + // no matter what, we want to delete the dummyId value + //delete docData[key]; + CfsAutoForm.Util.deepDelete(docData,key); + + // Get list of files that were attached for this key + var fileList = elem.data("cfsaf_files"); + + // If we have some attached files + if (fileList) { + // add all files to total count + totalFiles += fileList.length; } - // Loop through all hidden file inputs in the form. - var totalFiles = 0; - var arrayFields = {}; - template.$('.cfsaf-hidden').each(function () { - var elem = $(this); + // Otherwise it might be a multiple files field + else { + var fileListList = elem.data("cfsaf_files_multi"); + if (fileListList) { + // make a note that it's an array field + arrayFields[key] = true; + // add all files to total count + _.each(fileListList, function (fileList) { + totalFiles += fileList.length; + }); + // prep the array + docOrModifier[key] = []; + } + } + }); - // Get schema key that this input is for - var key = elem.attr("data-schema-key"); + // If no files were attached anywhere on the form, we're done. + // We pass back the docOrModifier synchronously + if (totalFiles === 0) { + return docOrModifier; + } - // no matter what, we want to delete the dummyId value - //delete doc[key]; - CfsAutoForm.Util.deepDelete(doc,key); + // Create the callback that will be called either + // upon file insert error or upon each file being uploaded. + var doneFiles = 0; + var failedFiles = 0; + function cb(error, fileObj, key) { + // Increment the done files count + doneFiles++; - // Get list of files that were attached for this key - var fileList = elem.data("cfsaf_files"); + // Increment the failed files count if it failed + if (error) { + failedFiles++; + } - // If we have some attached files - if (fileList) { - // add all files to total count - totalFiles += fileList.length; + // If it didn't fail, set the new ID as the property value in the docData, + // or push it into the array of IDs if it's a multiple files field. + else { + if (arrayFields[key]) { + CfsAutoForm.Util.deepFind(docData,key).push(fileObj._id); + } else { + //docOrModifier[key] = fileObj._id; + CfsAutoForm.Util.deepSet(docData,key,fileObj._id); } + } - // Otherwise it might be a multiple files field + // If this is the last file to be processed, pass execution back to autoform + if (doneFiles === totalFiles) { + // If any files failed + if (failedFiles > 0) { + // delete all that succeeded + CfsAutoForm.deleteUploadedFiles(template); + // pass back to autoform code, telling it we failed + self.result(false); + } + // Otherwise if all files succeeded else { - var fileListList = elem.data("cfsaf_files_multi"); - if (fileListList) { - // make a note that it's an array field - arrayFields[key] = true; - // add all files to total count - _.each(fileListList, function (fileList) { - totalFiles += fileList.length; - }); - // prep the array - doc[key] = []; - } + // pass updated docOrModifier back to autoform code, telling it we succeeded + self.result(docOrModifier); } - }); - - // If no files were attached anywhere on the form, we're done. - // We pass back the doc synchronously - if (totalFiles === 0) { - return doc; } + } - // Create the callback that will be called either - // upon file insert error or upon each file being uploaded. - var doneFiles = 0; - var failedFiles = 0; - function cb(error, fileObj, key) { - // Increment the done files count - doneFiles++; - - // Increment the failed files count if it failed - if (error) { - failedFiles++; + // Loop through all hidden file fields, inserting + // and uploading all files that have been attached to them. + template.$('.cfsaf-hidden').each(function () { + var elem = $(this); + + // Get schema key that this input is for + var key = elem.attr("data-schema-key"); + + // Get the FS.Collection instance + var fsCollectionName = elem.attr("data-cfs-collection"); + var fsCollection = FS._collections[fsCollectionName]; + + // delete old files assigned to this field + if(isUpdate) + { + // get the form's collection + var formCollection = self.template.data.collection; + if(_.isString(formCollection)) + { + formCollection = window[formCollection]; } - // If it didn't fail, set the new ID as the property value in the doc, - // or push it into the array of IDs if it's a multiple files field. - else { - if (arrayFields[key]) { - CfsAutoForm.Util.deepFind(doc,key).push(fileObj._id); - } else { - //doc[key] = fileObj._id; - CfsAutoForm.Util.deepSet(doc,key,fileObj._id); - } - } - - // If this is the last file to be processed, pass execution back to autoform - if (doneFiles === totalFiles) { - // If any files failed - if (failedFiles > 0) { - // delete all that succeeded - CfsAutoForm.deleteUploadedFiles(template); - // pass back to autoform code, telling it we failed - self.result(false); - } - // Otherwise if all files succeeded - else { - // pass updated doc back to autoform code, telling it we succeeded - self.result(doc); + if(formCollection instanceof Meteor.Collection) + { + var oldDocument = formCollection.findOne(docId); + if(oldDocument) { + var oldFiles = oldDocument[key]; + if(!_.isArray(oldFiles)) + { + oldFiles = [oldFiles]; + } + // delete the old files + if(isUpdate) + { + _.each(oldFiles, function(id){ + fsCollection.remove(id); + }); + + + } } } } - - // Loop through all hidden file fields, inserting - // and uploading all files that have been attached to them. - template.$('.cfsaf-hidden').each(function () { - var elem = $(this); - - // Get schema key that this input is for - var key = elem.attr("data-schema-key"); - - // Get the FS.Collection instance - var fsCollectionName = elem.attr("data-cfs-collection"); - var fsCollection = FS._collections[fsCollectionName]; - - // Loop through all files that were attached to this field - function loopFileList(fileList) { - _.each(fileList, function (file) { - // Create the FS.File instance - var fileObj = new FS.File(file); - - // Listen for the "uploaded" event on this file, so that we - // can call our callback. We want to wait until uploaded rather - // than just inserted. XXX Maybe should wait for stored? - fileObj.once("uploaded", function () { - // track successful uploads so we can delete them if any - // of the other files fail to upload - var uploadedFiles = elem.data("cfsaf_uploaded-files") || []; - uploadedFiles.push(fileObj); - elem.data("cfsaf_uploaded-files", uploadedFiles); - // call callback - cb(null, fileObj, key); - }); - - // Insert the FS.File instance into the FS.Collection - fsCollection.insert(fileObj, function (error, fileObj) { - // call callback if insert/upload failed - if (error) { - cb(error, fileObj, key); - } - // TODO progress bar during uploads - }); + // Loop through all files that were attached to this field + function loopFileList(fileList) { + _.each(fileList, function (file) { + // Create the FS.File instance + var fileObj = new FS.File(file); + + // Listen for the "uploaded" event on this file, so that we + // can call our callback. We want to wait until uploaded rather + // than just inserted. XXX Maybe should wait for stored? + fileObj.once("uploaded", function () { + // track successful uploads so we can delete them if any + // of the other files fail to upload + var uploadedFiles = elem.data("cfsaf_uploaded-files") || []; + uploadedFiles.push(fileObj); + elem.data("cfsaf_uploaded-files", uploadedFiles); + // call callback + cb(null, fileObj, key); }); - } - // single fields first - loopFileList(elem.data("cfsaf_files")); - // then multiple fields - _.each(elem.data("cfsaf_files_multi"), function (fileList) { - loopFileList(fileList); + // Insert the FS.File instance into the FS.Collection + fsCollection.insert(fileObj, function (error, fileObj) { + // call callback if insert/upload failed + if (error) { + cb(error, fileObj, key); + } + // TODO progress bar during uploads + }); }); + } + + // single fields first + loopFileList(elem.data("cfsaf_files")); + // then multiple fields + _.each(elem.data("cfsaf_files_multi"), function (fileList) { + loopFileList(fileList); }); + }); +}; + +Hooks = { + + beforeUpdate: function(docId, modifier, template) { + + + return beforeHook.call(this, modifier, template, docId); + }, + + + afterUpdate: function (error, result, template) { + return Hooks.afterInsert.call(this, error, result, template); + }, + + + beforeInsert: function(doc, template) + { + return beforeHook.call(this, doc, template, null); }, afterInsert: function (error, result, template) { - var elems = template.$('.cfsaf-hidden'); - if (error) { - CfsAutoForm.deleteUploadedFiles(template); - if (FS.debug || AutoForm._debug) - console.log("There was an error inserting so all uploaded files were removed.", error); - } else { + var elems = template.$('.cfsaf-hidden'); + if (error) { + CfsAutoForm.deleteUploadedFiles(template); + if (FS.debug || AutoForm._debug) + console.log("There was an error inserting so all uploaded files were removed.", error); + } else { // cleanup files data elems.removeData("cfsaf_files"); elems.removeData("cfsaf_files_multi"); diff --git a/cfs-autoform.js b/cfs-autoform.js index 8928b89..2644451 100644 --- a/cfs-autoform.js +++ b/cfs-autoform.js @@ -12,7 +12,6 @@ CfsAutoForm.deleteUploadedFiles = function(template) { }); }; - if (Meteor.isClient) { // Adds a custom "cfs-file" input type that AutoForm will recognize AutoForm.addInputType("cfs-file", { @@ -130,11 +129,13 @@ if (Meteor.isClient) { // We add a before.insert hook to upload all the files in the form. // This hook doesn't allow the form to continue submitting until // all the files are successfully uploaded. - insert: CfsAutoForm.Hooks.beforeInsert + insert: CfsAutoForm.Hooks.beforeInsert, + update: CfsAutoForm.Hooks.beforeUpdate }, after: { // We add an after.insert hook to delete uploaded files if the doc insert fails. - insert: CfsAutoForm.Hooks.afterInsert + insert: CfsAutoForm.Hooks.afterInsert, + update: CfsAutoForm.Hooks.afterUpdate } }); } diff --git a/versions.json b/versions.json index 2140fb1..c7042c6 100644 --- a/versions.json +++ b/versions.json @@ -2,7 +2,7 @@ "dependencies": [ [ "aldeed:autoform", - "4.0.0" + "4.1.0" ], [ "aldeed:simple-schema", @@ -22,7 +22,7 @@ ], [ "ddp", - "1.0.10" + "1.0.12" ], [ "deps", @@ -54,11 +54,11 @@ ], [ "livedata", - "1.0.10" + "1.0.11" ], [ "logging", - "1.0.4" + "1.0.5" ], [ "meteor", @@ -66,7 +66,7 @@ ], [ "minimongo", - "1.0.4" + "1.0.5" ], [ "mrt:moment", @@ -106,7 +106,7 @@ ], [ "ui", - "1.0.3" + "1.0.4" ], [ "underscore", @@ -114,6 +114,6 @@ ] ], "pluginDependencies": [], - "toolVersion": "meteor-tool@1.0.35", + "toolVersion": "meteor-tool@1.0.36", "format": "1.0" } \ No newline at end of file From 82919a396c6040dfb50d077c6117c5a630d939e1 Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 11 Dec 2014 11:18:03 +0100 Subject: [PATCH 03/10] change misspelled utils-name --- cfs-autoform-util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cfs-autoform-util.js b/cfs-autoform-util.js index 6df9899..0fa2a0d 100644 --- a/cfs-autoform-util.js +++ b/cfs-autoform-util.js @@ -2,12 +2,12 @@ Util = { //delete prop from obj //prop can be something like "obj.3.badprop deepDelete: function(obj, prop){ - return Utilities.deepDo(obj, prop, function(obj, prop){ + return Util.deepDo(obj, prop, function(obj, prop){ delete obj[prop]; }); }, deepSet: function(obj, prop, value){ - return Utilities.deepDo(obj, prop, function(obj, prop){ + return Util.deepDo(obj, prop, function(obj, prop){ obj[prop] = value; }); }, From 61173dc3521f347be92e0e94266d1c747b955e3a Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 11 Dec 2014 11:18:03 +0100 Subject: [PATCH 04/10] change misspelled utils-name From 5d6054cbc6a599e5e49eab95a29406704ca7f15c Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 11 Dec 2014 15:52:09 +0100 Subject: [PATCH 05/10] changed package name for this branch --- package.js | 6 +++--- versions.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.js b/package.js index 471cf4e..75767e1 100644 --- a/package.js +++ b/package.js @@ -1,8 +1,8 @@ Package.describe({ - name: "cfs:autoform", + name: "panter:cfs-autoform", version: "2.0.0", summary: "Upload files as part of autoform submission", - git: "https://github.com/aldeed/meteor-cfs-autoform.git" + git: "https://github.com/panter/meteor-cfs-autoform.git" }); Package.on_use(function(api) { @@ -22,4 +22,4 @@ Package.on_use(function(api) { 'cfs-autoform.js', 'cfs-autoform.css' ], 'client'); -}); \ No newline at end of file +}); diff --git a/versions.json b/versions.json index c7042c6..0a58f2e 100644 --- a/versions.json +++ b/versions.json @@ -2,7 +2,7 @@ "dependencies": [ [ "aldeed:autoform", - "4.1.0" + "4.2.0" ], [ "aldeed:simple-schema", From 8c70b8acc78c07b669bc378a6cbcb5066b7f9cd2 Mon Sep 17 00:00:00 2001 From: Marco Date: Fri, 12 Dec 2014 13:46:20 +0100 Subject: [PATCH 06/10] files gets only deleted when a field was not empty --- cfs-autoform-hooks.js | 29 +++++++++++++++++++++-------- package.js | 2 +- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/cfs-autoform-hooks.js b/cfs-autoform-hooks.js index ace8894..d1a5e88 100644 --- a/cfs-autoform-hooks.js +++ b/cfs-autoform-hooks.js @@ -110,15 +110,15 @@ var beforeHook = function (docOrModifier, template, docId) { // Get schema key that this input is for var key = elem.attr("data-schema-key"); - + var value = elem.val() + console.log(value); // Get the FS.Collection instance var fsCollectionName = elem.attr("data-cfs-collection"); var fsCollection = FS._collections[fsCollectionName]; - // delete old files assigned to this field - if(isUpdate) + var deleteOldFiles = function() { - // get the form's collection + // get the form's collection var formCollection = self.template.data.collection; if(_.isString(formCollection)) { @@ -137,6 +137,7 @@ var beforeHook = function (docOrModifier, template, docId) { // delete the old files if(isUpdate) { + _.each(oldFiles, function(id){ fsCollection.remove(id); }); @@ -146,6 +147,7 @@ var beforeHook = function (docOrModifier, template, docId) { } } } + // Loop through all files that were attached to this field function loopFileList(fileList) { _.each(fileList, function (file) { @@ -177,9 +179,22 @@ var beforeHook = function (docOrModifier, template, docId) { } // single fields first - loopFileList(elem.data("cfsaf_files")); + var fileList = elem.data("cfsaf_files"); + if(_.size(fileList) >0) + { + if(isUpdate) + deleteOldFiles() + loopFileList(fileList); + } // then multiple fields - _.each(elem.data("cfsaf_files_multi"), function (fileList) { + fileList = elem.data("cfsaf_files_multi"); + if(_.size(fileList) >0) + { + if(isUpdate) + deleteOldFiles() + loopFileList(fileList); + } + _.each(fileList, function (fileList) { loopFileList(fileList); }); }); @@ -188,8 +203,6 @@ var beforeHook = function (docOrModifier, template, docId) { Hooks = { beforeUpdate: function(docId, modifier, template) { - - return beforeHook.call(this, modifier, template, docId); }, diff --git a/package.js b/package.js index 75767e1..e9d40d4 100644 --- a/package.js +++ b/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "panter:cfs-autoform", - version: "2.0.0", + version: "2.0.1", summary: "Upload files as part of autoform submission", git: "https://github.com/panter/meteor-cfs-autoform.git" }); From 53e4e8f24c974497166b733b09a0857ca3a20d71 Mon Sep 17 00:00:00 2001 From: Marco Date: Fri, 17 Jul 2015 16:11:35 +0200 Subject: [PATCH 07/10] fix paths of nested objects --- cfs-autoform-util.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cfs-autoform-util.js b/cfs-autoform-util.js index 0fa2a0d..e0ee482 100644 --- a/cfs-autoform-util.js +++ b/cfs-autoform-util.js @@ -1,15 +1,14 @@ Util = { //delete prop from obj //prop can be something like "obj.3.badprop + // CHANGE: nested properties with dot are still strings, no need to dive into deepDelete: function(obj, prop){ - return Util.deepDo(obj, prop, function(obj, prop){ - delete obj[prop]; - }); + + delete obj[prop]; + }, deepSet: function(obj, prop, value){ - return Util.deepDo(obj, prop, function(obj, prop){ - obj[prop] = value; - }); + obj[prop] = value; }, //returns the object that CONTAINS the last property deepFind: function(obj, prop){ @@ -24,7 +23,7 @@ Util = { path = path.split('.'); for (i = 0; i < path.length - 1; i++) obj = obj[path[i]]; - + closure.apply(this, [obj, path[i]]); } }; From 33022a7dcab714b5efb0099a982eb408f8b1da54 Mon Sep 17 00:00:00 2001 From: Marco Date: Fri, 17 Jul 2015 16:12:05 +0200 Subject: [PATCH 08/10] update version --- package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.js b/package.js index e9d40d4..c5d96de 100644 --- a/package.js +++ b/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "panter:cfs-autoform", - version: "2.0.1", + version: "2.0.2", summary: "Upload files as part of autoform submission", git: "https://github.com/panter/meteor-cfs-autoform.git" }); From ab974e607c81e03f83b88574dd4f92df01c1334f Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 23 Jul 2015 12:13:44 +0200 Subject: [PATCH 09/10] fix a bug on insert --- cfs-autoform-hooks.js | 19 +++++++++++-------- cfs-autoform-util.js | 13 +++++++++---- package.js | 2 +- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/cfs-autoform-hooks.js b/cfs-autoform-hooks.js index d1a5e88..cecdb96 100644 --- a/cfs-autoform-hooks.js +++ b/cfs-autoform-hooks.js @@ -4,7 +4,7 @@ var beforeHook = function (docOrModifier, template, docId) { var isUpdate = true; // Util.deepFind uses a path to find if the key is set // In the update-case, the key is nested in the $set-object - // we therefore introduce a helperVariable: + // we therefore introduce a helperVariable: var docData = docOrModifier['$set']; } else @@ -16,7 +16,7 @@ var beforeHook = function (docOrModifier, template, docId) { if (!AutoForm.validateForm(this.formId)) { return false; } - + // Loop through all hidden file inputs in the form. var totalFiles = 0; @@ -30,7 +30,7 @@ var beforeHook = function (docOrModifier, template, docId) { // no matter what, we want to delete the dummyId value //delete docData[key]; CfsAutoForm.Util.deepDelete(docData,key); - + // Get list of files that were attached for this key var fileList = elem.data("cfsaf_files"); @@ -82,7 +82,10 @@ var beforeHook = function (docOrModifier, template, docId) { CfsAutoForm.Util.deepFind(docData,key).push(fileObj._id); } else { //docOrModifier[key] = fileObj._id; - CfsAutoForm.Util.deepSet(docData,key,fileObj._id); + if(isUpdate) + CfsAutoForm.Util.set(docData,key,fileObj._id); + else + CfsAutoForm.Util.deepSet(docData,key,fileObj._id); } } @@ -137,7 +140,7 @@ var beforeHook = function (docOrModifier, template, docId) { // delete the old files if(isUpdate) { - + _.each(oldFiles, function(id){ fsCollection.remove(id); }); @@ -147,7 +150,7 @@ var beforeHook = function (docOrModifier, template, docId) { } } } - + // Loop through all files that were attached to this field function loopFileList(fileList) { _.each(fileList, function (file) { @@ -211,7 +214,7 @@ Hooks = { return Hooks.afterInsert.call(this, error, result, template); }, - + beforeInsert: function(doc, template) { return beforeHook.call(this, doc, template, null); @@ -230,4 +233,4 @@ Hooks = { // cleanup uploaded files data elems.removeData("cfsaf_uploaded-files"); } -}; \ No newline at end of file +}; diff --git a/cfs-autoform-util.js b/cfs-autoform-util.js index e0ee482..aa25caa 100644 --- a/cfs-autoform-util.js +++ b/cfs-autoform-util.js @@ -3,13 +3,18 @@ Util = { //prop can be something like "obj.3.badprop // CHANGE: nested properties with dot are still strings, no need to dive into deepDelete: function(obj, prop){ - + delete obj[prop]; - + }, - deepSet: function(obj, prop, value){ + set: function(obj, prop, value) { obj[prop] = value; }, + deepSet: function(obj, prop, value){ + return CfsAutoForm.Util.deepDo(obj, prop, function(obj, prop){ + obj[prop] = value; + }); + }, //returns the object that CONTAINS the last property deepFind: function(obj, prop){ path = path.split('.'); @@ -23,7 +28,7 @@ Util = { path = path.split('.'); for (i = 0; i < path.length - 1; i++) obj = obj[path[i]]; - + closure.apply(this, [obj, path[i]]); } }; diff --git a/package.js b/package.js index c5d96de..902c0d1 100644 --- a/package.js +++ b/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "panter:cfs-autoform", - version: "2.0.2", + version: "2.0.3", summary: "Upload files as part of autoform submission", git: "https://github.com/panter/meteor-cfs-autoform.git" }); From 184c8e5b64bfcd8388f1ffbf023bfb1983edac40 Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 23 Jul 2015 22:12:49 +0200 Subject: [PATCH 10/10] restore original values --- package.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.js b/package.js index cb91a49..3fb5c26 100644 --- a/package.js +++ b/package.js @@ -1,11 +1,13 @@ Package.describe({ - name: "panter:cfs-autoform", + name: "cfs:autoform", version: "2.2.1", summary: "Upload files as part of autoform submission", - git: "https://github.com/panter/meteor-cfs-autoform.git" + git: "https://github.com/aldeed/meteor-cfs-autoform.git" }); + + Package.onUse(function(api) { api.use('underscore@1.0.1', 'client'); api.use('templating@1.0.9', 'client');