Json pdf to oracle blob

Hi all,

I’m having an issue getting a pdf from an URL and inserting it into an Oracle database. I’m using REST and connecting and receiving the JSON. I can see the path where the pdf is located(S3.amazon). How do I get this document using NovaCura?

–Tim

1 Like

Hi,

You will have to confirgure a REST connector in novacura in order to retrive the PDF from the 3 rd party application . please refer the link below.

how to set up a REST connector - Getting started - Flow Help (novacuraflow.com)

shyaminda

We have the REST connector setup and working. We have a URL to a PDF file on the internet. How can we get that file into Novacura to do things with it, like save it to a file system, or write a BLOB to the database?

Coworker of @Keyhole here…

We know that Novacura can work with BLOBs, because that seems to be what’s created by the HTML2PDF connector. So maybe the most pertinent question is this:

Within Novacura, how can we convert RAW file data (i.e. the data returned by a GET) into a BLOB?

Tom

Hi,
I do not have a working example against Oracle, but in MS SQL I think you would need to convert it to a binary. Convert(varminary(max), your invariable)

I thought the file connector would be just “write all bytes to file” or “write stream to file” option under the file connector.

Or perhaps I misunderstood, is the question around how you would fetch the binary from the Rest connector?

1 Like

Hi,

i one of our previous PoCs we were generating and then fetching documents from an online shipping (REST) service and attaching them to IFS (storing them as oracle blobs) via Flow.

In our case, the online documentation for that REST service told us that the document itself will come as a (Base64) string. So we were taking that data and just assigning it to a blob type variable and then using it in a procedure call.


Also when using HtmlToPdf connector the result is a record with data column (that is a binary stream)
We use the same procedure for attaching to IFS by just assigning that column to a blob variable and then using it in a procedure call.

So i would say that the blob data type, when used within a machine step, is quite… accepting when it comes to contents and that no conversion is needed most of the time :slight_smile:

Hope this helps!

B R
Ivan

2 Likes

Hi!

Very curious in how you achieved this conversion from a base64 string to a binary blob.
I have tried this in different ways but have not been able to get it to work…

How do you perform the conversion from base64 to binary?

Best Regards
David

Hi @davidg ,

As far as I know there’s no support in Flow to decode Base64 into binary, only to text. We’ve done decode to binary in projects by using a custom connector. In one customer solution we use Flow as an API for different integration scenarios, one being upload file to IFS. That API method takes a WoNo and Bas64 binary string as a parameters and check in the document to IFS DocMan and connects it to a work order.

Developing custom connectors will require some .NET knowledge. Here’s the help section on custom connectors: Custom .NET - Flow Help.