Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6763309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:27:38+00:00 2026-05-26T14:27:38+00:00

I am trying to upload a File with one parameter using spring 3. This

  • 0

I am trying to upload a File with one parameter using spring 3.

This is my controller method which should enable this service:

@RequestMapping(value="/{id}", method = RequestMethod.PUT, headers="content-type=multipart/form-data")
public ResponseEntity<String> uploadImageWithJsonParamater(@PathVariable("id") Long id, @RequestParam String json, @RequestParam MultipartFile customerSignFile) {
    //...
}

The problem is, that the server cannot dispatch to this method:
MissingServletRequestParameterException: Required String parameter ‘json’ is not present

If I change the RequestMethod from PUT to POST, everything is fine. So does anybody know the problem?

It seems that it isn’t allowed to transmit form-data via PUT.

I debugged a little bit and the following method returns false in the PUT case but true in the POST case:

public boolean isMultipart(HttpServletRequest request) {
    return (request != null && ServletFileUpload.isMultipartContent(request));
}

I would appreciate any help!

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:27:39+00:00Added an answer on May 26, 2026 at 2:27 pm

    You can’t send form data via PUT as per the HTML standard. You can only send files via PUT, and in this case they’re send more efficiently then with POST (because you no longer have all the multi-part overhead), but in order for you PUT listening server side component to actually receive a file via PUT you have to make sure that you actually send a PUT command to it (via javascript for instance). Here’s an example that uses JQuery:

    $('#file_upload').fileUpload({
        namespace: 'file_upload',
        url: '/path',
        method: 'PUT'
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to upload file(s) using PrototypeJs request method but I failed. The
Using MVC3.NET I have a file upload method in a controller that works fine
I'm trying to do a file upload in Flex using it's FileReference class. This
I am trying to upload file using php. I am using the function move_uploaded_file.
I'm trying to upload a file using Watin and C#. Under Windows XP, Watin
I am trying to upload a file using commons-fileupload-1.1.1.jar file (I know it is
I'm trying to upload a file to the server using a HTTP multipart form
friends, i am trying to upload file to php server using following tutorial http://getablogger.blogspot.com/2008/01/android-how-to-post-file-to-php-server.html
Using the asp.net file upload control is very easy, i'm trying to squeeze it
I am trying to upload a file in GAE using the Blobstore API. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.