mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Another colab fix
This commit is contained in:
@@ -168,9 +168,11 @@ app.use((req, res, next) => {
|
||||
if (req.url.startsWith('/characters/') && is_colab && process.env.googledrive == 2) {
|
||||
|
||||
const filePath = path.join(__dirname, charactersPath, decodeURIComponent(req.url.substr('/characters'.length)));
|
||||
console.log('req.url: ' + req.url);
|
||||
console.log(filePath);
|
||||
fs.access(filePath, fs.constants.R_OK, (err) => {
|
||||
if (!err) {
|
||||
res.sendFile(filePath);
|
||||
res.sendFile(filePath, { root: __dirname });
|
||||
} else {
|
||||
res.send('Character not found: ' + filePath);
|
||||
//next();
|
||||
|
Reference in New Issue
Block a user