Spring MVC Framework: MultipartResolver with PUT method

后端 未结 2 823
醉梦人生
醉梦人生 2021-01-02 14:33

I\'m developing a spring mvc app with framework 3.2.3.RELEASE

In my app I handle Multipart with StandardServletMultipartResolver, but with apache commons-fileupload

2条回答
  •  心在旅途
    2021-01-02 15:15

    PUT refers to a single resource, for example one file. So, by definition, a multi-part form doesn't match the PUT verb.

    So I guess they made these checks for POST to be able to apply to the HTTP specs: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

    I guess you could argue that PUTting a custom object that contains multiple fields, including one or more files, should be ok, it could still be considered as being one resource in REST terms, but this is not the way most implementers seem to interpret this.

提交回复
热议问题