Hi Claudio

Sorry, I think I misunderstood you. I thought you were talking about users in e.g. public instance using a multi-part form to upload documents to the DMS.

Well, basically the idea is to "directly" upload a document into the DMS, similar like managing pages in the "Website" pane you manage documents in the "DMS" pane. There is even the possibility to upload a zip file containing multiple documents, which will all be extracted into the DMS.

But if I understood you correctly, you would like to have a dialog with a control to upload a file to the DMS. AFAIK no such control exists. Your best catch would be to take a closer look at the "file" control (class info.magnolia.cms.gui.dialog.DialogFile), because that does precisely that, however to the web page. So maybe you might want to create a new control, based on the "DialogFile" one and replace the "website" repository with the "dms" repository and a content node you want to store the document.

Is that what you are looking for?

Cheers
/giancarlo


On Apr 23, 2008, at 11:25 PM, claudio.greuter wrote:

Hi Giancarlo

You're talking about uploading the Document from the paragraph template, right? Isn't it possible to upload the file directly from a paragraph's dialog to a location in the DMS?

Our users are accustomed to use the Dialogs to edit paragraphs in the CMS, and I would prefer not to break with this tradition.

Thanks
Claudio



-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 23. April 2008 17:57
An: [email protected]
Betreff: Re: [magnolia-user] Creating a CMS dialog to Upload a file to the DMS

Hi Claudio

Yes, it is in fact quite easy to upload a document to the DMS, thanks
to "RequestFormUtil" class.

Your form in the paragraphs script needs to be a "multipart-form" (so
enctype="multipart/form-data" in the form tag).
In your JSP/Servlet you can use the RequestFormUtil class to get the
uploaded document.

To upload to DMS you need the HierarchyManager on the "dms"
repository, then you can create nodes and add the document.

Cheers
/giancarlo
----------------------------------------------------------------

----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------



----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------

Reply via email to