Hi! I installed the PDF Viewer extension and I want to know how to upload a pdf file during page creation. When editing a page, you can see the tabs below (attachments → add attachments) but this is not shown while creating a page.
The only workaround I see for now is to save the page I created and then edit it again and add the attachment. The only problem I see here is that I also installed the Change Request Application so as much as possible I would want to restrict my users from saving pages without going through its workflow.
Hi! I played around a bit in my XWiki and using the PDF Viewer Macro (not the pro) allowed me to upload a pdf file during page creation (the user needs to have edit rights enabled). It also allows you to show PDFs from a different page.
With Change Request Application, the workaround I figured out was to create a page to act as a repository (I named it PDFs) for PDF files. While creating, I was able to select the PDF file in the Edit Macro window.
Indeed, the attachments tab is not present in edit mode, however:
The PDF Viewer macro - the pro version at least, that I tested - allows to upload a file directly from the dialog when adding the macro to the page - be it a newly created page or an existing page- :
(when the “file” field is focused, you can then upload the file to your page)
The link UI of the editor allows to upload a file directly when creating a link to an attachment:
When adding images to the page, it’s also possible to upload an image directly when creating a new page:
So, as long as you use that attachment somewhere in the content of your page, it is possible to upload it directly from where you plan to use it (a pdf to view, or a file to link to, or an image to include in the page). The only thing that it’s not accessible from the UI of the edit mode is to upload a file that you don’t plan to use in the content of the page. This is somewhat normal in XWiki, as the content of pages is supposed to be the first class citizen, attachments are only to “complete” the content with media that is not supported in the content itself, so the assumption is that there would be some kind of reference to the attachment from the content…