mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix GIF background server crash
This commit is contained in:
@@ -1258,7 +1258,7 @@
|
||||
<input id="play_message_sound" type="checkbox" />
|
||||
<audio id="audio_message_sound" src="sounds/message.mp3" hidden></audio>
|
||||
<span>
|
||||
New Message Sound
|
||||
Message Sound
|
||||
<a href="/notes/message_sound" class="notes-link" target="_blank">
|
||||
<span class="note-link-span">?</span>
|
||||
</a>
|
||||
|
@@ -2013,9 +2013,10 @@ async function generateThumbnail(type, file) {
|
||||
|
||||
try {
|
||||
const image = await jimp.read(pathToOriginalFile);
|
||||
await image.cover(mySize[0], mySize[1]).quality(95).writeAsync(pathToCachedFile);
|
||||
const buffer = await image.cover(mySize[0], mySize[1]).quality(95).getBufferAsync(mime.lookup('jpg'));
|
||||
fs.writeFileSync(pathToCachedFile, buffer);
|
||||
}
|
||||
catch {
|
||||
catch (err) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user