I am unable to get a file from a form, still getting a PluginHttpRequestWrapper and not a MultiPartRequestWrapper. I am absolutely sure I have enctype="multipart/form-data" in the form. I will be thankful for any ideas.
atlassian-plugin.xml:
<webwork1 key="test" name="test" i18n-name-key="test.name"> <description key="test.description">The test Plugin</description> <actions> <action name="package.action.TestBrowse" alias="TestBrowse"> <view name="input">/templates/test/browse/input.vm</view> </action> </actions> </webwork1>
input.vm:
<form action="TestBrowse.jspa" id="upload-form" method="post" enctype="multipart/form-data"> <input type="hidden" name="id" value="10000"/> <div id="attach-max-size" class="hidden">10000000000</div> <input type="file" name="uploadFile"/> <input type="submit"/> </form>
TestBrowse.java:
@Override public String doExecute() throws Exception { MultiPartRequestWrapper requestWrapper = ServletActionContext.getMultiPartRequest(); if (requestWrapper == null) log.error("Why am I not getting a multipart wrapper?") else { ...do something... } return returnCompleteWithInlineRedirect("/browse/" + getIssueObject().getKey()); }
Hi Martin.
Here's what I find out: http://stackoverflow.com/questions/15761800/single-file-upload-in-jira/20527469#20527469
Thanks.
Hi Bruno,
thank you very much, I will try the first option soon.
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin.
Did you find out why the contentType was not multipart/form-data?
I have exacly the same problem.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.