On 6/5/02 7:33 AM, "Matt Baldree" ([EMAIL PROTECTED]) penned the words:

> [chain actions]
> I proto the chain action feature but I was unable to convince myself that
> there is a compelling reason to have this over what we have now. Nor was
> anybody able to present a compelling argument for this. So for now I tabled
> this and am moving on to other requests.
Ok with me ;)
 
> [attachment aware action]
> I'm now looking at the AttachmentAware request and would like to solicit
> some input on it. I definitely think this is needed because it is so
> commonly used and would provide a great benefit. So the need for this is a
> no brainer IMO. I'm soliciting developers who have already implemented this
> to some degree that would like to donate their code and/or work with me on
> this.

I think I was the one that requested this, and we needed it last week so we
just did this (for JIRA 1.1).

I'm happy to share the code - we used a wwupload.jar (which I don't have the
source of - I got it from Patrick Lightbody - who I think got it from this
list), the Pell multipartrequest class (because the license on cos.jar is
too restrictive) and our own code in the action. The wwupload.jar is well
written and you can 'plugin' the multipart request processor you want to use
(you can also use cos if you want)

I have attached the two JARs. I don't have the code to the wwupload.jar but
if you JAD it and clean it up I'm sure it's OK to use. (If anyone created
this JAR and doesn't want people using it - please speak up!).

The AttachFile action handles the file upload - it uses prepare() to upload
the file, and then copies it to a better location in doExecute(). You'll
figure it out ;) The attachfile.jsp is the JSP which it is uploaded from,
I'm not sure if you need this or not. Just has a basic multipart form and a
<input type="file"> tag.

This should give you a good start. Perhaps best to turn the AttachFile
action into a file upload example action?

Hope this helps - let me know if you have any questions!
Mike


Mike Cannon-Brookes
[EMAIL PROTECTED]

ATLASSIAN - Your J2EE Expert Partner
--------------------------------------------------------
> Brilliant Software - http://www.atlassian.com/software
> Legendary Services - http://www.atlassian.com/support

Attachment: pell-multipartrequest.jar
Description: Binary data

Attachment: attachfile.jsp
Description: Binary data

Attachment: wwupload.jar
Description: Binary data

Attachment: AttachFile.java
Description: Binary data

Reply via email to