0

I have a javascript based webscript using which user can upload files, create folders and retrieve uploaded files and their respective metadata. Now I want to enable a functionality for user to preview the uploaded files in Document Preview Pane of share console in a separate window.

Unfortunately I couldn't able to find any builtin webscript in alfresco console( http://172.20.3.63:8080/alfresco/s/index). Or any javascript api. I did able to find webscript in share console(http://172.20.3.63:8080/share/page/index )

172.20.3.63:8080/share/page/components/preview/web-preview?nodeRef=workspace://SpacesStore/d6e102a7-a0f1-4a20-ac05-387bb3636529 But result is a blank webpage. I want to allow user to preview the file based on the authentication of my webscript which is based on alfresco ticket.

Any suggestion to achieve aforementioned functionality?

Bilal Saeed
  • 116
  • 10

1 Answers1

1

Try this kind of URL:

https://example.com/share/proxy/alfresco/api/node/workspace/SpacesStore/700a66d1-15ea-41e3-9032-d069d673ef5c/content/thumbnails/pdf

Replace 700a66d1-15ea-41e3-9032-d069d673ef5c with the UUID of your node.

You can also replace the last segment pdf with other renditions you want to see: doclib (PNG thumbnail), imgpreview (JPG preview), and others.

  • Have tried using the UUID of my node it didn't work either. [link](http://172.20.3.63:8080/share/proxy/alfresco/api/node/workspace/SpacesStore/d6e102a7-a0f1-4a20-ac05-387bb3636529/content/thumbnails/jpg) – Bilal Saeed Jul 27 '16 at 05:12
  • There is no thumbnail named `jpg`, try `doclib` or `imgpreview`. –  Jul 27 '16 at 06:34
  • It worked but I want it to be previewed in share's document preview pane to enable pagination and other related features that it provides. – Bilal Saeed Jul 27 '16 at 06:50
  • What exactly to you mean? What pagination and "related features" do you want to see? Isn't the `document-details` what you want? –  Jul 27 '16 at 07:01
  • I do but this api is only showing the content not details. By pagination I mean the web previewer of share console where you can zoom and browse to pages. – Bilal Saeed Jul 27 '16 at 07:46