Moved dev file storage to inside meteor app folder
Prevented verbose logging of file storage
This commit is contained in:
1
app/.gitignore
vendored
1
app/.gitignore
vendored
@@ -3,6 +3,7 @@
|
||||
.demeteorized
|
||||
.cache
|
||||
.vscode
|
||||
fileStorage
|
||||
settings.json
|
||||
public/components
|
||||
public/_imports.html
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createS3FilesCollection } from '/imports/api/files/s3FileStorage.js';
|
||||
|
||||
const UserImages = createS3FilesCollection({
|
||||
collectionName: 'userImages',
|
||||
storagePath: Meteor.isDevelopment ? '/DiceCloud/userImages/' : 'assets/app/userImages',
|
||||
storagePath: Meteor.isDevelopment ? '../../../../../fileStorage/userImages' : 'assets/app/userImages',
|
||||
onBeforeUpload(file) {
|
||||
// Allow upload files under 10MB
|
||||
if (file.size > 10485760) {
|
||||
|
||||
@@ -50,7 +50,7 @@ if (Meteor.isServer && Meteor.settings.useS3) {
|
||||
storagePath,
|
||||
onBeforeUpload,
|
||||
onAfterUpload,
|
||||
debug = !Meteor.isProduction,
|
||||
debug,// = !Meteor.isProduction,
|
||||
allowClientCode = false,
|
||||
}) {
|
||||
const collection = new FilesCollection({
|
||||
@@ -224,7 +224,7 @@ if (Meteor.isServer && Meteor.settings.useS3) {
|
||||
storagePath,
|
||||
onBeforeUpload,
|
||||
onAfterUpload,
|
||||
debug = !Meteor.isProduction,
|
||||
debug,// = !Meteor.isProduction,
|
||||
allowClientCode = false,
|
||||
}) {
|
||||
const collection = new FilesCollection({
|
||||
|
||||
Reference in New Issue
Block a user