Colab google drive fix (supposed)

This commit is contained in:
SillyLossy
2023-04-06 00:05:16 +03:00
parent e489061b6f
commit 024c2f73de

View File

@ -167,7 +167,7 @@ app.use(function (req, res, next) { //Security
app.use((req, res, next) => {
if (req.url.startsWith('/characters/') && is_colab && process.env.googledrive == 2) {
const filePath = path.join(charactersPath, decodeURIComponent(req.url.substr('/characters'.length)));
const filePath = path.join(__dirname, charactersPath, decodeURIComponent(req.url.substr('/characters'.length)));
fs.access(filePath, fs.constants.R_OK, (err) => {
if (!err) {
res.sendFile(filePath);