mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Colab google drive fix (supposed)
This commit is contained in:
@ -167,7 +167,7 @@ app.use(function (req, res, next) { //Security
|
|||||||
app.use((req, res, next) => {
|
app.use((req, res, next) => {
|
||||||
if (req.url.startsWith('/characters/') && is_colab && process.env.googledrive == 2) {
|
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) => {
|
fs.access(filePath, fs.constants.R_OK, (err) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
res.sendFile(filePath);
|
res.sendFile(filePath);
|
||||||
|
Reference in New Issue
Block a user