On Fri, May 2, 2014 at 7:31 PM, Faizel Dakri <[email protected]> wrote:
> New Xwiki user here and first time post. I am very impressed with the
> XWiki platform. We are using it for our company intranet and it has been
> able to handle just about everything that I've wanted and without too
> much pain. A bit of a learning curve, but I think I have a much better
> grasp of it now.
>
> That said, I have a strange issue that I've been able to confirm on two
> different instances of XWiki (both 5.4.4 and 5.4.3). I am using the PDF
> Embed Object macro to display PDF attachments inline, however the
> ability to view those PDFs full screen in the browser is hampered (I
> have users on IE 9, so the newer pdf.js based viewers won't work for
> me).
>
> Here's what I'm seeing:
>
> I have a test user that has edit rights on a page. They can create a
> page, edit it and upload an attachment to the page. They use the pdf
> embed object macro like so:
>
>     {{pdf filename="somefile.pdf" /}}
>
> This macro uses the <object> tag to display the PDF inline, however the
> "VIEW THIS PDF FULL SCREEN" button is just a hyperlink like so:
>
>     <a href="/xwiki/bin/download/MySpace/MyPage/somefile.pdf">View this
>     PDF full screen</a>
>
> The PDF is displayed inline just fine with the object tag, however the
> button to view the pdf fullscreen doesn't seem to work properly if the
> user that uploaded the attachment didn't have programming rights when
> the file was uploaded. When that same test user views the page and
> clicks the "VIEW THIS PDF FULL SCREEN" button, the file is actually
> downloaded rather than viewed in the browser.

> My guess is that something
> in the server is setting the content-disposition differently based on
> the rights?

Yes. See 
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki52M2#HChoosingwhichtypesofattachmentscanbedisplayedinline28Security29
. Look for attachment.download.whitelist and
attachment.download.blacklist in xwiki.properties file.

Hope this helps,
Marius

>
> If I give that user programming rights after they've uploaded the file,
> they still cannot view the file inline (the file is still downloaded
> rather than viewed inline). However, if that user now tries to upload
> the same file again (now that they have programming rights), then the
> button will properly show the full screen PDF inline.
>
> Has anyone seen this behavior or know of a workaround?
>
> Thanks for any advice or pointers!
>
> Here's my setup:
>
> XWiki 5.4.4 (affects 5.4.3 as well)
> Mac OS X 10.9.2
> Apache 2.2.26
> Tomcat 7.0.52 (with mod_jk connector)
> PostgreSQL 9.3
>
> F
>
> --
> Faizel Dakri
> [email protected]
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to