Home > Back-end > Questions about springboot upload file
Questions about springboot upload file
Time:03-25
1, springboot uploading files also need to configure any rely on? 2, file the save to where? Later to publish to the server, to ensure that the project does not affect the upload and echo after release, give some advice?
CodePudding user response:
Start module of the web, you don't need you to additional import; As for preservation, way too much, the server disk have, use the cloud storage, too
CodePudding user response:
1. Assuming that save the path to the server, so you need to set up a server to save address (local) is a local disk address 2. Save time use save address + file path, file name, save to the corresponding address 3. The deposited in the database, it is best to use the relative path is the path to the file + file name, convenient late migration 4. The last to the server to make a forwarding, sprintboot static resource configuration, direct access url + database to store relative path
I doubt that you didn't understand, you can come step by step