There is spring mvc and a simple form (for example), respectively, I use this form to create and edit a contact (I pull data from the database).
<form> <input id="name" type="text"> ... <input id="photo" type="file"> <button type="submit">submit</button> </form>
Trouble occurs if the user does not change the photo when editing, then when sending the form in the tag <input id="photo" type="file">
will be empty and the existing photo will be successfully replaced with NULL
. Are there any solutions on the client side? and how to do things like that?