I'm new to Spring, thank you.
I would like to implement a file upload function in Java (Spring boot).
What is the most commonly used technique for implementing file uploads in Spring?
After a little research, the implementation method in multipart is hit, but I feel that this is like uploading multiple files at the same time. ..
What we would like to achieve together is as follows.

・ Create several forms and upload each one individually
・ When uploaded, it automatically changes to a specific image size
・ Preview function (image will be displayed when uploaded)

I would appreciate any advice.

  • Answer # 1

    It fits in multipart.
    When sending data to a Web application using the POST method using a form
    Two types of Content-Type (data format) are commonly used: "application/x-www-form-urlencoded" and "multipart/form-data".
    The former is used for simple text data, but the latter (multipart) is used when sending binary data such as files.

    The three functions listed are different functions, so I think it's a good idea to proceed one by one.