Add files via upload

This commit is contained in:
2025-12-31 13:59:51 +08:00
committed by GitHub
parent ec09ed420c
commit 7a0eb06ad0
8 changed files with 1451 additions and 392 deletions

View File

@@ -121,6 +121,11 @@ export async function createNewCharacter(name) {
formData.append('depth_prompt_depth', '4');
formData.append('depth_prompt_role', 'system');
const base64Png = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
const res = await fetch(`data:image/png;base64,${base64Png}`);
const blob = await res.blob();
formData.append('avatar', blob, 'default.png');
const response = await fetch('/api/characters/create', {
method: 'POST',
headers: getRequestHeaders({ omitContentType: true }),