I prepared a web request as in attached image. But it seems there are limitations on EasyMorph… when I fill “file_content” parameter with a 5 page pdf in base64 (which have 63496 characters) it works perfectly. But if I try a pdf with 6 pages (which have 81500 characters), it appears the error (I will translate from Italian) “Not valid URI, URI string too long”.
Are there limits in size for application/x-www-form-urlencoded requests? Can I remove this limit? Sometimes I’ve to send pdf made of 40 pages…
yes, there is a limit of 65520 characters in a web-form value.
If the remote_id can be omitted, then you can upload the documents via the request body using the “Upload Document From Local Path” method described in the Docparser’s API documentation.
Hi Dmitry, thanks for support.
I update to 5.1.1.10 and now it works!
I want also to share my use case:
We sell a service via mobile app that allows to upload pdf invoices and we store these in a database blob column in base64 format.
Maybe, with your first suggestion I could have extracted it and made a temporary file for upload via local path, but I’m waiting your 5.2 release with embedded python environment for do this
I would need python to convert from base64 to create a pdf file from the database, then upload it as you suggested. Maybe do you have another suggestion? I tried execute “Run program” for calling my local python environment but I can’t quite understand how to use it, in fact after a few errors I gave up…
But don’t worry, now I can successful use “Web request” to resolve my issue.
You can try using the decode() function to convert from a base64-encoded text, and then the “Export as plain text” action to save the value into a file. The action might add a line break at the end of the file, though.