I couldn't figure out how to use getParts() to save the parameters.
I am trying to pass 4-5 inputs of type text along with an image file. I want to retrieve the parameters into strings so I can add them to the database and save the image in a blob format in the database (not in the server directory).
Any Help would be Highly appreciated. Thanks in Advance
<form class="form-signin" action="createAlbum" method="post" enctype="multipart/form-data" role="form"> <h2 class="form-signin-heading"> Add details to create an Album. </h2> <input type="text" name="aname" class="form-control" placeholder="Album Name" required> <input type="text" name="artists" class="form-control" placeholder="Artist" required> <input type="date" name="rdate" class="form-control" placeholder="Release Date" required > <input type="text" name="type" class="form-control" placeholder="Genre" required > <input type="text" name="price" class="form-control" placeholder="Price"> <input type="file" name="picture" class="form-control" placeholder="Picture" required > <button class="btn btn-lg btn-primary btn-block" type="submit">Add Album</button> </form>
Servletcode where you are trying to retrieve the parameters. There is no real way to help you without seeing some code. It will also help if you give more detail about what you have tried and the results; are there any errors or exceptions? Are some of the parameters received but not others? If you provide more details, you will give those that want to help a better idea of your problem.