mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-07 12:05:51 +00:00
Add files via upload
This commit is contained in:
@@ -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 }),
|
||||
|
||||
Reference in New Issue
Block a user