Foros de discusión
How to expose getPreviewURL() method of DLUtil as JSON web service
Ronak Parekh, modificado hace 8 años.
How to expose getPreviewURL() method of DLUtil as JSON web service
Junior Member Mensajes: 76 Fecha de incorporación: 6/04/15 Mensajes recientes
Hi Team,
I am new to JSON web service in Liferay. I just wanted to get download url of any document of Document & Media portlet using getPreviewURL() method as web service api. So please suggest me any solution.
Thank you.
I am new to JSON web service in Liferay. I just wanted to get download url of any document of Document & Media portlet using getPreviewURL() method as web service api. So please suggest me any solution.
Thank you.
Jan Geißler, modificado hace 8 años.
RE: How to expose getPreviewURL() method of DLUtil as JSON web service
Liferay Master Mensajes: 735 Fecha de incorporación: 5/07/11 Mensajes recientes
Go to localhost:8080/api/jsonws
There you can see all Available WebService methods. Search for:
dlapp/get-file-entries-and-file-shortcuts
If the method you are searching for is not there, or the methods are insufficent, you could try and implement a "dummy service" descripbed here in David's blog post:
https://www.liferay.com/de/web/26526/blog/-/blogs/fake-servicebuilder-entities
There you can see all Available WebService methods. Search for:
dlapp/get-file-entries-and-file-shortcuts
If the method you are searching for is not there, or the methods are insufficent, you could try and implement a "dummy service" descripbed here in David's blog post:
https://www.liferay.com/de/web/26526/blog/-/blogs/fake-servicebuilder-entities
James Falkner, modificado hace 8 años.
RE: How to expose getPreviewURL() method of DLUtil as JSON web service (Respuesta)
Liferay Legend Mensajes: 1399 Fecha de incorporación: 17/09/10 Mensajes recientes
Why not just use existing web services (like /dlapp/get-file-entry) to get the UUID and groupId of the document you want to preview, then construct the url as follows:
http://localhost:8080/c/document_library/get_file?uuid=83fd1e65-655b-465d-90d1-efd308c73b1f&groupId=20182
replace localhost:8080 with your hostname and port, and the uuid and groupId parameters with their appropriate values.
http://localhost:8080/c/document_library/get_file?uuid=83fd1e65-655b-465d-90d1-efd308c73b1f&groupId=20182
replace localhost:8080 with your hostname and port, and the uuid and groupId parameters with their appropriate values.
Ronak Parekh, modificado hace 8 años.
RE: How to expose getPreviewURL() method of DLUtil as JSON web service
Junior Member Mensajes: 76 Fecha de incorporación: 6/04/15 Mensajes recientes
Hi James Falkner,
Thanks for reply.
I have question like what if i want this url as result. For example if i provide fileEntryId and invoke it then in result it should give download url.
Suggest me, if this approach is right or wrong?
Thanks in advance.
Thanks for reply.
I have question like what if i want this url as result. For example if i provide fileEntryId and invoke it then in result it should give download url.
Suggest me, if this approach is right or wrong?
Thanks in advance.
Ronak Parekh, modificado hace 8 años.
RE: How to expose getPreviewURL() method of DLUtil as JSON web service
Junior Member Mensajes: 76 Fecha de incorporación: 6/04/15 Mensajes recientes
Hi,
I got it.
Thanks for help.
I got it.
Thanks for help.