File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export class FileParser {
6262 /**
6363 * Parse a Blob or File (handles binary detection and decompression)
6464 */
65- async parseFile ( blob : Blob , fileName ? : string ) : Promise < Result > {
65+ async parseFile ( blob : Blob , fileName : string ) : Promise < Result > {
6666 // Read first 2 bytes to detect gzip magic bytes
6767 const chunk = await blob . slice ( 0 , 2 ) . arrayBuffer ( ) ;
6868 const bytes = new Uint8Array ( chunk ) ;
Original file line number Diff line number Diff line change @@ -870,7 +870,7 @@ export class StackgazerApp {
870870 if ( text && text . trim ( ) ) {
871871 // Create a File object from the text content
872872 const blob = new Blob ( [ text ] , { type : 'text/plain' } ) ;
873- const file = new File ( [ blob ] , 'clipboard- paste.txt ' , { type : 'text/plain' } ) ;
873+ const file = new File ( [ blob ] , 'paste' , { type : 'text/plain' } ) ;
874874 await this . handleFiles ( [ file ] ) ;
875875 }
876876 }
@@ -904,7 +904,7 @@ export class StackgazerApp {
904904 // Handle regular file - parser handles binary detection
905905 console . time ( `📄 File Import: ${ file . name } ` ) ;
906906
907- const result = await this . parser . parseFile ( file ) ;
907+ const result = await this . parser . parseFile ( file , file . name ) ;
908908
909909 if ( result . success ) {
910910 this . profileCollection . addFile ( result . data ) ;
@@ -2716,7 +2716,7 @@ export class StackgazerApp {
27162716
27172717 // Create File object to use consistent parsing API
27182718 const file = new File ( [ arrayBuffer ] , fileName ) ;
2719- const result = await this . parser . parseFile ( file ) ;
2719+ const result = await this . parser . parseFile ( file , fileName ) ;
27202720
27212721 if ( result . success ) {
27222722 this . profileCollection . addFile ( result . data ) ;
You can’t perform that action at this time.
0 commit comments