Foros de discusión

File URL at web service document library

thumbnail
ilke Muhtaroglu, modificado hace 12 años.

File URL at web service document library

Regular Member Mensajes: 226 Fecha de incorporación: 12/05/09 Mensajes recientes
Hi,

I want to upload a file via Liferay web service. Than I want to get the uploaded files url to publish as a link at web page.

Is it possible to get the File's URL after file upload via web service ?

Kind Regards.

ilke
thumbnail
Hitoshi Ozawa, modificado hace 12 años.

RE: File URL at web service document library

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
ilke, with over 200 posts, you've been with the forum long enough to do a search before posting your questions. This question has come up number of enough times already.

Forum Guidelines below:
http://www.liferay.com/community/forums/-/message_boards/message/572822
thumbnail
ilke Muhtaroglu, modificado hace 12 años.

RE: File URL at web service document library

Regular Member Mensajes: 226 Fecha de incorporación: 12/05/09 Mensajes recientes
thanks.

I was in hurry and some times refreshing the forum posts is fine I think...

Regards.

ilke
thumbnail
ilke Muhtaroglu, modificado hace 12 años.

RE: File URL at web service document library

Regular Member Mensajes: 226 Fecha de incorporación: 12/05/09 Mensajes recientes
Hi,

I couldnt find any related post at the forums ?

Here was the point I came with web service client :

http://docs.liferay.com/portal/5.1/javadocs/portal-client/com/liferay/client/portlet/documentlibrary/model/DLFileEntrySoap.html

Here there is no friendly URL of the document. Name and other things are present !

http://www.liferay.com/web/connor.mckay/blog/-/blogs/5262286 is a blog about constructing the URLs...


to sum up I coulnt find the answer at post...

Have a nice day.


ilke
thumbnail
ilke Muhtaroglu, modificado hace 12 años.

RE: File URL at web service document library

Regular Member Mensajes: 226 Fecha de incorporación: 12/05/09 Mensajes recientes
for those interested.

Documents at document library have a regular pattern ! So the URL is somehow can be created via string concatenation.

http://xx.xx.xx.xx/documents/10156/11863/Ornek_Belge Here 10156 is the organization / comunnity Id (that can be get from the control panel)

Here the 11863 is the folder name, you can get it as described at this forum post : http://www.liferay.com/community/forums/-/message_boards/message/9384295

Then you upload the document via dlsoap.getFileEntry(groupId, folderId, name) method (please search the liferay webservice client for your method ) .

One important note the portalclient.jar at sourceforge site for liferay 6.05 is it has a model definition bug, according to this liferay forum post : http://www.liferay.com/community/forums/-/message_boards/message/9342740 download the portal-client.jar at this forum post or generate the portal-client.jar from the source via ant target !

I hope this helps ...

yours

ilke
thumbnail
ilke Muhtaroglu, modificado hace 12 años.

RE: File URL at web service document library

Regular Member Mensajes: 226 Fecha de incorporación: 12/05/09 Mensajes recientes
Also this way you can create and access a file in DL:


http://localhost:8080/c/document_library/get_file?uuid=2e2894f4-45fb-47b4-b4c1-616136205a1c&groupId=18

System.out.println("----File URL " + "http://localhost:8080/c/document_library/get_file?uuid=" + dlFileEntrySoap.getUuid() + "&groupId=" + companyId );


ilke