[
https://issues.apache.org/jira/browse/FILEUPLOAD-367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18057211#comment-18057211
]
Pierre Maurice Schwang commented on FILEUPLOAD-367:
---------------------------------------------------
Thank you [~ggregory]!
I'm not really able to test it for my specific case, as commons-fileupload is
used by a third-party software we depend on. But based on the code, it'll solve
my issue :)
> (Jakarta/Javax)ServletFileUpload.isMultipartContent should allow PUT/PATCH
> request methods
> ------------------------------------------------------------------------------------------
>
> Key: FILEUPLOAD-367
> URL: https://issues.apache.org/jira/browse/FILEUPLOAD-367
> Project: Commons FileUpload
> Issue Type: Bug
> Reporter: Pierre Maurice Schwang
> Priority: Minor
> Fix For: 2.0.0-M5
>
>
> As already published to the mailing list
> ([https://lists.apache.org/thread/1d038yn6cjsn86fxs6fvkvtopxt40vo0)]
>
> {{JakartaServletFileUpload.isMultipartContent}} (or
> {{ServletFileUpload.isMultipartContent}} in 1.X) only allows POST requests to
> be used in combination with multipart requests. PUT or PATCH requests
> including a multipart body will always return {{{}false{}}}. Those should be
> allowed as well.
> Even though I think a large amount of APIs (and especially forms) will use
> POST requests for that - REST APIs do certainly use the other two methods.
> That's at least why I stumbled upon this in the first place, as an API I have
> to call requires a multipart with PUT.
> Not sure if this should rather be a feature request or not, feel free to
> edit. Same with the priority. A potential fix / feature change could be
> https://github.com/apache/commons-fileupload/compare/master...PierreSchwang:commons-fileupload:FILEUPLOAD-367-request-methods
--
This message was sent by Atlassian Jira
(v8.20.10#820010)