mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge pull request #3215 from ceruleandeep/feature/uploadSprite
/uploadsprite slashcommand
This commit is contained in:
@@ -124,9 +124,10 @@ router.get('/get', jsonParser, function (request, response) {
|
||||
})
|
||||
.map((file) => {
|
||||
const pathToSprite = path.join(spritesPath, file);
|
||||
const mtime = fs.statSync(pathToSprite).mtime?.toISOString().replace(/[^0-9]/g, '').slice(0, 14);
|
||||
return {
|
||||
label: path.parse(pathToSprite).name.toLowerCase(),
|
||||
path: `/characters/${name}/${file}`,
|
||||
path: `/characters/${name}/${file}` + (mtime ? `?t=${mtime}` : ''),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user