Question

Getting PDF file from bpm'online

Dear,

We are building a portal website (PHP) where we want to provide PDF-files to the users. These PDF-files are stored as attachments in the 'Attachments and notes'-tab of a section in bpm'online.

With odata, we receive a link to the PDF file. But when a user clicks this link, the login-page of bpm'online is shown.

Is there any way we can extract these PDF files from bpm'online towards the portal without user login required?

For example, stream the base64 data from bpm'online and recreate the PDF in the portal?

Kind regards,

Vincent 

Like 0

Like

4 comments

Dear all,

Problem is solved by casting the InvoiceFile.Data-field to base64 in the SQL-query of the view in bpm'online:

cast('' as xml).value('xs:base64Binary(sql:column("invf.[Data]"))', 'varchar(max)') AS UsrInvoicePDF,

Now the base64 data can be fetched by the portal via odata, and the PDF file is recreated in the PHP-code of the portal.

Kind regards,

Vincent

It's possible to change web service mode to anonymous. However in this way it will be a clear violation of security policy. All files from bpm'online will be accessible to everyone, so it's not recommended to do. Before making requests a third party application must be authenticated and receive the corresponding cookies. Please use cookies and sessions in all requests. I hope the article below will help you.

https://academy.bpmonline.com/documents/technic-sdk/7-13/executing-odata-queries-using-fiddler

 

Vincent Tahon,

 

Hi , I have also the same scenario where I need to fetch the documents from Custom Section from Creatio to the third-party portal so that end customers can download the files.

 

I was struggling to understand how it can be done at a third-party application using OData. 

 

My application is on .NET (C#).

 

It will be helpful you can guide me for the same.



Many thanks

Akshit

 

Could you please elaborate on what is hard for you to understand? 

At what point are you having trouble ? 



Best regards, 

Yurii

Show all comments