cancel
Showing results for 
Search instead for 
Did you mean: 

Adding content from external webapp

andrepra
Champ in-the-making
Champ in-the-making
I needed to add some content files in Alfresco from other web applications. To do that I implemented a web-app that uses web-services api to "upload" file in Alfresco. So, when i need to send a file to Alfresco from other applications i add a link that open the new web-app in a pop up window, i upload the file and the web-app send it to Alfresco throught webservices api.
I would ask if there is a way to do that using the extension of Alfresco web client. What I need is something like this: writing a jsp using the Alfresco component to create a form. In this form i need to collect data (input field) and the file (upload). Submiting the form all the data (file included) are setted in a bean where i can perform some operation with the Alfresco API (adding the content, writing metadata, ecc.).
Reading about JSF and I think this could be possible, but I'm not sure.
if yes, is there an example to follow?
Andrea
4 REPLIES 4

gavinc
Champ in-the-making
Champ in-the-making
Hi,

Yes, it is possible. We have to support both a webapp and portlet use so we have to jump through a few hoops to have file uploads in both these environments (at the time we implemented it MyFaces didn't have support for file upload in portals).

If you only need to support a web app scenario then you can use the MyFaces file upload component in your app. This will allow you to have a single form that uploads the file content and the form data in one go.

Hope this helps.

andrepra
Champ in-the-making
Champ in-the-making
Thanks for your answer, but what I would like to do is to develop my upload jsp form into Alfresco Web Client as an extension and avoid the use of a third web-app to manage the upload.
This is our current scenario: two web-app W1 and W2 need to upload document. so we have developed a web-app (U) for upload that send file to Alfresco (A). So the user submit the file and data to U that send file to A throught web services.
The desired scenario is: develop the same function of U as Alfresco web client extension (Aext). So W1 and W2 call Aext  for uploading. The user submit data and file to Aext that send data to A throught native api because both A and Aext are the same webapp.
I need to develop a Aext, and i don't want to use directly A, because I need to customize graphics and form depending from the caller (W1 and W2)
What I don't know is it is possible and how to do is putting Aext into A in this way: adding a folder under jsp folder (ie: /jsp/custom), putting the jsp with the form (upload file and data) and adding the required configuration file to map the manager bean of MyFaces.

Andrea

gavinc
Champ in-the-making
Champ in-the-making
Yes, you can add that functionality as an extension. There are several examples of doing this sort of thing in the wiki, go to http://wiki.alfresco.com/wiki/Web_Client_Customisation_Guide and have a look at the following examples:
    Adding a Custom Dialog
    Customising An Alfresco JSP
    Customising The Create Content Wizard
    Customising The Login Page
A combination of these examples should give you enough information to do what you need to do.

sam69
Champ in-the-making
Champ in-the-making
Hi Andrea !

I am interrested by the Alfresco upload extention… Is it working ?
Do you plan to add it to the Alfresco Forge ?

regards,

Samuel