Where to find the draggable attachment files of some issue in JIRA?

Thank you for visiting.

I write some code to do upload and download job in a servlet. But there are problems dealing with the saving path while uploading files. It works well in my custom plugin but gets a dead link after adding to production installations of JIRA.

String uploadFileSavePath=this.getServletContext().getRealPath("/"+projectKey+"-"+vname);

Then I read some source code to find out where the draggable attachment files of some issue have gone. But I still have no answer.

So what is the appropriate way to set the attachment files saving path?

Thank you.