AnsweredAssumed Answered

Java API for file upload?

Question asked by agatap on Jun 18, 2008
Latest reply on Jun 20, 2008 by agatap
I am writing a java-backed webscript, that should upload a file to the repository (as a custom content type).
Currently we work on Alfresco 2.1C, with Oracle/MySql.
I have a form, which sends the content type to multipart, and sends the file in the body of a POST.
Its a simple XML file with meta-data, and I thought it will be simple and straightforward task. 
However, I cant see how I can access the InputStream from a WebScript.
I need to do it from java, as there is a lot of handling once the file is uploaded -adding aspects, performing actions on it etc.

So, I need to do one of the following:
A:  how can I upload a file from the InputStream when I am inside a java backed  WebScipt?
B: Is it alternatively possible to use a servlet to do the task?
Where can I find information about how to configure the deployment descriptor for alfresco, so that my servlet is exposed? I cant find any examples about how to add servlets to my .amp file.

Outcomes