Moved dev file storage to inside meteor app folder

Prevented verbose logging of file storage
This commit is contained in:
Stefan Zermatten
2022-11-19 18:34:52 +02:00
parent b6b0cfbb9b
commit cea63e6a8e
4 changed files with 6 additions and 5 deletions

View File

@@ -6,13 +6,13 @@ import { CreatureSchema } from '/imports/api/creature/creatures/Creatures.js';
const ArchiveCreatureFiles = createS3FilesCollection({
collectionName: 'archiveCreatureFiles',
storagePath: Meteor.isDevelopment ? '/DiceCloud/archiveCreatures/' : 'assets/app/archiveCreatures',
storagePath: Meteor.isDevelopment ? '../../../../../fileStorage/archiveCreatures' : 'assets/app/archiveCreatures',
onBeforeUpload(file) {
// Allow upload files under 10MB, and only in json format
if (file.size > 10485760) {
return 'Please upload with size equal or less than 10MB';
}
if (!/json/i.test(file.extension)){
if (!/json/i.test(file.extension)) {
return 'Please upload only a JSON file';
}
return true;