Last active
August 29, 2015 14:08
-
-
Save aaronthorp/53d42eab37a390475acf to your computer and use it in GitHub Desktop.
CFS FileSystem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FS.TempStore.Storage = new FS.Store.FileSystem("_tempstore", { | |
internal : true, | |
path : '/mnt/data/tmp', | |
}); | |
SpreadsheetFS = new FS.Collection("spreadsheets", { | |
stores: [new FS.Store.FileSystem("spreadsheets", {path: "/app-storage/uploads"})], | |
filter: { | |
allow: { | |
contentTypes: [ | |
'application/vnd.ms-excel', | |
'application/msexcel', | |
'application/x-msexcel', | |
'application/x-ms-excel', | |
'application/x-excel', | |
'application/x-dos_ms_excel', | |
'application/xls', | |
'application/x-xls', | |
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | |
] | |
} | |
} | |
}); | |
SpreadsheetFS.allow({ | |
insert: function(userId, doc) { | |
if (userId) | |
return true; | |
else | |
return false; | |
}, | |
update: function(userId, doc, fields, modifier) { | |
if (userId) | |
return true; | |
else | |
return false; | |
}, | |
remove: function(userId, doc) { | |
return true; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment