AnsweredAssumed Answered

Embedding the Share Previewer on your own website

Question asked by zmsil on Mar 29, 2016
Hi Everyone

I am currently battling with an issue that has been brought up before addressed to a certain extent. I am  currently trying to embed the alfresco viewer on my own website but I'm finding it a challenge. I first went through the steps that Mike Hatfield posted which were to add the following code to my page:

<embed type="application/x-shockwave-flash"

   src="http://<server>:<port>/share/components/preview/WebPreviewer.swf"

   width="670px"

   height="670px"

   id="WebPreviewer"

   name="WebPreviewer"

   quality="high"

   allowscriptaccess="sameDomain"

   allowfullscreen="true"

   wmode="transparent"

   flashvars="fileName=aaar.png&amp;paging=false&amp;url=http%3A%2F%2Flocalhost%3A8080%2Falfresco%2Fservice%2Fapi%2Fnode%2Fworkspace%2FSpacesStore%2F15ddb4a8-63a5-4bf3-95a8-4d121d2eaed2%2Fcontent%3Fc%3Dforce%26noCacheToken%3D1257980553515%26guest%3Dtrue&amp;show_fullscreen_button=true&amp;i18n_actualSize=Actual%20Size&amp;i18n_fitPage=Fit%20Page&amp;i18n_fitWidth=Fit%20Width&amp;i18n_fitHeight=Fit%20Height&amp;i18n_fullscreen=Fullscreen&amp;i18n_fullwindow=Maximize&amp;i18n_fullwindow_escape=Press%20Esc%20to%20exit%20full%20window%20mode&amp;i18n_page=Page&amp;i18n_pageOf=of" />



I then tried to run it but there was nothing loading on my previewer. I figured that it might be an authentication issue as I didnt need to enter my alfresco credentials so I decided to put my code in a DotCMIS ASP project. I put the repository connection on the page load and put Mike's code on the page. When I ran it, I was prompted to login but then after that the file loads endlessly. I purposely altered the flashvars variable to see if the previewer would load with a mistake in the variable but it only loaded for a second. I'm guessing that shows that my flashvars is proper. But now I am not sure how to then load my content on the previewer because it loads and loads. Is there something I might perhaps be missing? Is there a simpler way to do this?

If anyone could help me, I would really appreciate it. If you might not really understand my problem feel free to ask and I will try to further best explain the situation as I can. I am using alfresco 3.4.d by the way.(I know, it's an old version)

Kind Regards and hoping to hear from someone soon

Zmsil

Outcomes