RE: javascript get file from LIferay 7 document and media section

Olaf Kock, modified 3 Years ago. New Member Post: 1 Join Date: 10/28/20 Recent Posts

Hi,

How do I use javascript to get a image file / PDF file uploaded to Liferay 7 docment and media?

I know there is Liferay.Service('/journalarticle/.....') can be called from javscript to retrieve web content article.

But what is the API to retrieve images or PDF in document and media section?

Is there anywhere I can see all the available liferay API to be called by javascript?

Thanks

thumbnail
Tanweer ., modified 3 Years ago. Expert Posts: 322 Join Date: 3/11/10 Recent Posts

Hi,

The APIs available to javascript are listed at "/api/jsonws".

You can use the below to retrieve File Entry information.

http://localhost:8080/api/jsonws?contextName=&signature=/dlapp/get-file-entry-3-long-long-java.lang.String