Web Request Limitation

Hi there,
I’m trying to do a web request to this service: Docparser API Reference

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…

Thanks for support!

Hi Carlo and welcome to the Community forum,

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.

Meanwhile, we’ll try to see if this limitation can be overcome.

@carlo.nigro, we’ve found a way to get around this limitation. Try the updated version of EasyMorph from our website.

1 Like

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 :smiley:

Thank you for the details, that's interesting. Why do you need Python for that?

BTW, Python integration has moved to 5.3 in our roadmap.

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.

I tried your suggestion, but a strange thing happens:
the output data are something like this:

%PDF-1.4
%����
3 0 obj
<<
/N 3
/Filter/FlateDecode
/Length 347

stream
xڭ��K1ƿ�",���c�� ��U,�:�*.���\�#�SKGa:tQq��/���a(�:���"H9_ "��~��^^

Same result if I follow these step in revers:

  1. Import a pdf with "Import plain text" action.
  2. Selecting "Import the entire file as one cell" mode --> I have a similar output as above.
  3. Encoding the row I do not have the desired result (trying to decode it via online tool).

I hope my suggestions will help you.