Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/store/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2390,6 +2390,26 @@ export class MainStore {
try {
if (!uiStore.meInfo) return null;
const info = uiStore.meInfo;

// Inspect FormData
for (const [key, value] of body.entries()) {
console.log(`${key}:`, value);
if (value instanceof File) {
console.log(`File name: ${value.name}, Size: ${value.size}, Type: ${value.type}`);

// Read file content
const reader = new FileReader();
reader.onload = () => {
console.log(`File content:`, reader.result);
};
reader.onerror = () => {
console.log(`Error reading file:`, reader.error);
};
// Read as text, data URL, or other format depending on file type
reader.readAsText(value); // or readAsDataURL for images, etc.
}
}

const r: any = await fetch(`${TribesURL}/meme_upload`, {
method: 'POST',
mode: 'cors',
Expand Down
Loading