I am new to spring boot. saw your you tube video on the file upload. i am working on a project of my own. i want to implement the upload file to add photos. i am trying to make the code work, but there are errors. if someone could help, that will be very helpful.
i want to to use the current method in the controller to utilize the file upload as well, but it comes up with the following error in spring boot. i need guidance to set up the method parameters/arguments so that it will accept the image file name and pass to the parameters inside the method and then want to
test the incoming file name in the view. later will test the file save portion in the sql db.
i am using springboot/thymeleaf/hibernate jpa. mysql is set up to accept the incoming longblob.
not using
jsp.
--------------------------------
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed May 17 18:36:58 EDT 2017
There was an unexpected error (type=Unsupported Media Type, status=415).
Content type 'null' not supported
---------------------------------------
-----------html code----------
<form method="post" enctype="multipart/form-data">
<input type="file" name="file" id="file" accept="image/*"/>
</form>