Answer the question
In order to leave comments, you need to log in
How to upload files to have access to them later?
In WebMvcConfig
registry.addResourceHandler("/resources/**")
.addResourceLocations("/public", "classpath:/static/");
private static final String STATIC_PATH = "src/main/resources/static";
Answer the question
In order to leave comments, you need to log in
Hello!
You upload files to the resources directory, but to make them available you need to recompile the project again. Usually, if some kind of file loading logic is implied in the application, then the files are loaded into another directory outside the project. For example, /home/example.com/uploads A path to a file, etc. be stored in the database. If necessary, you can access the database and get the path to the file with the name and give it to the client. If this is about...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question