File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -2390,6 +2390,26 @@ export class MainStore {
23902390 try {
23912391 if ( ! uiStore . meInfo ) return null ;
23922392 const info = uiStore . meInfo ;
2393+
2394+ // Inspect FormData
2395+ for ( const [ key , value ] of body . entries ( ) ) {
2396+ console . log ( `${ key } :` , value ) ;
2397+ if ( value instanceof File ) {
2398+ console . log ( `File name: ${ value . name } , Size: ${ value . size } , Type: ${ value . type } ` ) ;
2399+
2400+ // Read file content
2401+ const reader = new FileReader ( ) ;
2402+ reader . onload = ( ) => {
2403+ console . log ( `File content:` , reader . result ) ;
2404+ } ;
2405+ reader . onerror = ( ) => {
2406+ console . log ( `Error reading file:` , reader . error ) ;
2407+ } ;
2408+ // Read as text, data URL, or other format depending on file type
2409+ reader . readAsText ( value ) ; // or readAsDataURL for images, etc.
2410+ }
2411+ }
2412+
23932413 const r : any = await fetch ( `${ TribesURL } /meme_upload` , {
23942414 method : 'POST' ,
23952415 mode : 'cors' ,
You can’t perform that action at this time.
0 commit comments