File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
components/ocrspace/actions/common Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1+ import { ConfigurationError } from "@pipedream/platform" ;
12import FormData from "form-data" ;
23import { getUrlOrFile } from "../../common/utils.mjs" ;
34import ocrspace from "../../ocrspace.app.mjs" ;
@@ -49,7 +50,7 @@ export default {
4950 } = getUrlOrFile ( this . file ) ;
5051
5152 if ( url ) data . append ( "url" , url ) ;
52- if ( file ) data . append ( "file " , file ) ;
53+ if ( file ) data . append ( "base64Image " , file ) ;
5354 if ( this . imageLanguage ) data . append ( "language" , this . imageLanguage ) ;
5455 if ( this . isOverlayRequired ) data . append ( "isOverlayRequired" , `${ this . isOverlayRequired } ` ) ;
5556 if ( this . filetype ) data . append ( "filetype" , this . filetype ) ;
@@ -65,6 +66,11 @@ export default {
6566 } ) ;
6667
6768 $ . export ( "$summary" , this . getSummary ( ) ) ;
69+
70+ if ( response . ErrorMessage ) {
71+ throw new ConfigurationError ( response . ErrorMessage [ 0 ] ) ;
72+ }
73+
6874 return response ;
6975 } ,
7076} ;
You can’t perform that action at this time.
0 commit comments