This repository was archived by the owner on Mar 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -406,18 +406,22 @@ class IndexifyClient {
406
406
formData ,
407
407
{
408
408
params : { id : newContentId } ,
409
- headers : { "Content-Type" : "multipart/form-data" }
409
+ headers : {
410
+ "Content-Type" : "multipart/form-data" ,
411
+ "accept" : "*/*"
412
+ }
410
413
}
411
414
) ;
412
415
413
- contentId = response . data . content_id ;
414
- }
416
+ contentId = response . data . content_id || newContentId ;
417
+
418
+ if ( contentId ) {
419
+ return contentId ;
420
+ }
415
421
416
- if ( ! contentId ) {
417
- throw new Error ( "No content ID was retrieved from the extraction process" ) ;
418
422
}
419
423
420
- return contentId ;
424
+ throw new Error ( "No content ID was retrieved from the extraction process" ) ;
421
425
}
422
426
423
427
async getExtractionGraphs ( ) : Promise < ExtractionGraph [ ] > {
@@ -473,7 +477,7 @@ class IndexifyClient {
473
477
for ( const contentId of ids ) {
474
478
try {
475
479
const response = await this . client . get (
476
- `namespaces/ ${ this . namespace } /content/${ contentId } /wait`
480
+ `/content/${ contentId } /wait`
477
481
) ;
478
482
479
483
console . log ( "Extraction completed for content id: " , contentId ) ;
You can’t perform that action at this time.
0 commit comments