Display generated bg in the bg block. Add ability to copy chat bg to system list.

This commit is contained in:
Cohee
2023-10-21 17:43:25 +03:00
parent 8d121bf38f
commit 5012237eb3
7 changed files with 200 additions and 85 deletions

View File

@ -870,7 +870,7 @@ export async function saveBase64AsFile(base64Data, characterName, filename = "",
// If the response is successful, get the saved image path from the server's response
if (response.ok) {
const responseData = await response.json();
return responseData.path;
return responseData.path.replace(/\\/g, '/'); // Replace backslashes with forward slashes
} else {
const errorData = await response.json();
throw new Error(errorData.error || 'Failed to upload the image to the server');