It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira Plugin with File Uploading

Carl Nolan Jun 14, 2012

I'm trying to create a plugin which needs to read some data from a user-supplied file. I've tried a normal file-input HTML element in a form in a velocity template and posting to an action Java class (I think that makes sense?) but it seems that no files are passed.

I'm using the Apache ServletFileUpload class along with some others which are supposed to work for exactly what I need. I seem to be doing everything as per the tutorials I've seen around but it's not working. It does however work when I remove the enc-type but just for non-file inputs such as text, passwords etc.

So I've come to the conclusion that Jira is causing these issues. Anyone done something like this before or know if it's possible? Thanks The "receiving" code:

DiskFileItemFactory fileItemFactory = new DiskFileItemFactory();

    ServletFileUpload upload = new ServletFileUpload(fileItemFactory);
    FileItemIterator iterator = upload.getItemIterator(request);

    List items = upload.parseRequest(request);
    Iterator it = items.iterator();

    while (it.hasNext()) {
    	FileItem item = (FileItem);
    	System.out.println("Got file");

1 answer

1 accepted

0 votes
Answer accepted
Carl Nolan Jun 19, 2012

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in United States

Topic Tuesday: Agile

Another week, another Topic Tuesday!  Agile has been on my mind a lot lately because I've seen good implementations and bad implementations, but now as a Jira admin it matters more to me whether...

14 views 0 0
View post

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you