forked from daniel-j/send2ereader
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfig.js
More file actions
37 lines (32 loc) · 852 Bytes
/
Copy pathconfig.js
File metadata and controls
37 lines (32 loc) · 852 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
34
35
36
37
const port = process.env.PORT ? Number(process.env.PORT) : 3001;
const expireDelay = 10 * 60; // seconds
const maxExpireDuration = 1 * 60 * 60; // 1 hour
const maxFileSize = 1024 * 1024 * 800; // 800 MB
const TYPE_EPUB = "application/epub+zip";
const TYPE_MOBI = "application/x-mobipocket-ebook";
const allowedTypes = [
TYPE_EPUB,
TYPE_MOBI,
"application/pdf",
"application/vnd.comicbook+zip",
"application/vnd.comicbook-rar",
"text/html",
"text/plain",
"application/zip",
"application/x-rar-compressed",
];
const allowedExtensions = ["epub", "mobi", "pdf", "cbz", "cbr", "html", "txt"];
const keyChars = "23456789ACDEFGHJKLMNPRSTUVWXYZ";
const keyLength = 4;
module.exports = {
port,
expireDelay,
maxExpireDuration,
maxFileSize,
TYPE_EPUB,
TYPE_MOBI,
allowedTypes,
allowedExtensions,
keyChars,
keyLength,
};