jeudi 29 mars 2018

How to upload an image or a video to a persistant folder in class-path with Spring-Boot?

I am new in Spring-Boot... I want to upload images or videos, and store them in a persistant folder "upload-storage" in the class-path of my project in the server. I don't want to store them in the database (20 Mo). Spring-Boot store them in target/upload-storage. That functions : I can show the videos on the view with the controller and Thymeleaf. I can close tomcat, close the browser, and open them again : that functions. But the day after, upload-storage is disapeared ! I think that I don't use the good process. But I found how to upload an image : ok. I found how to show images from a folder in class-path : ok. I found how to upload images to database. But nothing to store the uploaded images in a persistant folder. Can you help me ?




Aucun commentaire:

Enregistrer un commentaire