Win a copy of Java Challengers this week in the Java in General forum!

shaikh russell

Greenhorn
+ Follow
since Mar 13, 2017
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by shaikh russell

shaikh russell wrote: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>





3 years ago
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>



3 years ago


I would like to add multiple images for each item in the web page using spring boot mvc, hibernate JPA; not using jsp. How could this be done without adding images directly in the mysql db, but a link of the image, image name and size in the db would be fine. This way its easier to add and delete image links in the db. Images can be stored in this location in Intellij IDEA: \src\main\resources\images.

Does a new table need to be created or more columns need to be added in the existing tables. None of the tables has columns about images.