• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Spring MultipartException: The current request is not a multipart request

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to upload a file with AngularJS and Spring controller. The Angular controller looks like this:



I also try this:



and the Spring controller looks like this:



My html Page looks like this:



I have 2 jars in web-inf/lib:commons-upload.jar and commons-io.jar I add this in my spring configuration file:


When I'm trying to upload a file, I get the error:

When I'm trying to upload a file using MultipartHttpServletRequest in my spring function instead of Multipart i get this error:

When i use HttpServletRequest request and i try to cast it i got a ClassCastException. Nothing change when i cancel enctype="multipart/form-data" from my form Tag.

My error is a server side error.
Any help will be much appreciated
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic