-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuckets.js
More file actions
33 lines (31 loc) · 859 Bytes
/
buckets.js
File metadata and controls
33 lines (31 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const mongoose = require('mongoose');
const courseMaterialsBucket = new mongoose.mongo.GridFSBucket(mongoose.connection.db,
{
chunkSizeBytes: 1024 * 1024,
bucketName: 'courseMaterials'
}
);
const lessonMaterialsBucket = new mongoose.mongo.GridFSBucket(mongoose.connection.db,
{
chunkSizeBytes: 1024 * 1024,
bucketName: 'lessonMaterials'
}
);
const profilePicsBucket = new mongoose.mongo.GridFSBucket(mongoose.connection.db,
{
chunkSizeBytes: 1024 * 1024,
bucketName: 'profilePics'
}
);
const answerMaterialsBucket = new mongoose.mongo.GridFSBucket(mongoose.connection.db,
{
chunkSizeBytes: 1024 * 1024,
bucketName: 'answerMaterials'
}
);
module.exports = {
courseMaterialsBucket,
lessonMaterialsBucket,
profilePicsBucket,
answerMaterialsBucket
}