veryfi / veryfi-ruby Goto Github PK
View Code? Open in Web Editor NEWRuby gem for communicating with the Veryfi OCR API.
Ruby gem for communicating with the Veryfi OCR API.
Hi,
it seems that the latest 1.0.2 gem is not working properly:
gem "veryfi", git: "https://github.com/veryfi/veryfi-ruby.git"
from my Gemfilegem "veryfi", "~> 1.0.2"
bundle update veryfi
Same behavior/issue is present in freshly created rails app.
Thanks.
Martin
It looks like the release action for 1.0.2 never pushed the update to rubygems. Wondering if someone can take a look and bump the version for the faraday dependency
Thanks
Given:
VeryfiClient = Veryfi::Client.new(
client_id: ENV.fetch('VERYFI_CLIENT_ID', nil),
client_secret: ENV.fetch('VERYFI_CLIENT_SECRET', nil),
username: ENV.fetch('VERYFI_USERNAME', nil),
api_key: ENV.fetch('VERYFI_API_KEY', nil),
)
params = {
file_path: 'spec/fixtures/purchase_vendor_bills/vendor_bill.pdf',
auto_delete: true,
boost_mode: false,
async: false,
external_id: '123456789',
max_pages_to_process: 10,
tags: ['tag1'],
categories: [
'Advertising & Marketing',
'Automotive'
]
}
Then make a request with the below code
VeryfiClient.document.process(params)
and got an error
Veryfi::Error::BadRequest: Bad Request
from /project_gems/ruby/2.7.0/gems/veryfi-0.1.3/lib/veryfi/request.rb:63:in `make_request'
The same result with only :file_path parameter
params = {
file_path: 'spec/fixtures/purchase_vendor_bills/vendor_bill.pdf',
}
UPDATE:: Made some investigation.
API responses 400 when "file_name" POST-parameter hasn't extension.
For example,
{
"file_name": "invoice",
"file_data": "application/pdf;base64,JVBERi0xLjQKJcfsj6IKJSVJbnZvY......."
}
returns 400
But
{
"file_name": "invoice.pdf",
"file_data": "application/pdf;base64,JVBERi0xLjQKJcfsj6IKJSVJbnZvY........"
}
returns 201.
Hello,
we run into weird problem with files which were uploaded to veryfi directly via web interface.
We are able to retrieve them via api request but we are not able to delete them.
Delete request fails with internal server error:
.rvm/gems/ruby-3.1.1/gems/veryfi-0.1.4/lib/veryfi/request.rb:63:in `make_request': Internal Server Error (Veryfi::Error::InternalError)
Delete request for documents uploaded via api works ok.
Is this a known bug or feature?
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.