To test with an image file, try this code

#!/bin/sh

test_url='35.232.51.61:5000/extract'

img_file=./invoices/awsome_invoice.png

(echo  '{';
 echo ' "image": "';
    base64 $img_file;
 echo '", '
 echo ' "features": [{ "donate": "1"}] ';
 echo ' }') | curl -H "Content-Type: application/json" -d @-  $test_url

* You can toggle the "donate" flag to indicate if we can keep the uploaded file

* If you need a sample invoice image, you can borrow this image

To test with a PDF file, try this code

#!/bin/sh

test_url='35.232.51.61:5000/extract'

pdf_file=./invoices/awesome_invoice.pdf


(echo  '{';
 echo ' "pdf": "';
    base64 $pdf_file;
 echo '", '
 echo ' "features": [{ "donate": "1"}] ';
 echo ' }') | curl -H "Content-Type: application/json" -d @-  $test_url

 

* You can toggle the "donate" flag to indicate if we can keep the uploaded file

* If you need a sample PDF invoice, you can use this awesome invoice file

* Not all PDF invoices are created equal. However unlikely, some PDF files cannot be converted to image with the library we are using. For example, this PDF file. For testing purposes, please use an image file if you encounter an error. 

Leave a message

If you have any questions or encounter any problems while testing, please don't hesitate to leave a message using the form below. Thank you! 

Contact:

© 2019 mlreader.com