How does one specify a temp directory for file uploads in Spring Boot?

前端 未结 4 1661
太阳男子
太阳男子 2021-02-01 17:42

I\'m using Spring Boot and need to let users upload files for processing. Right now, the file uploads to /home/username/git/myproject which is not great.

How do I make S

4条回答
  •  孤独总比滥情好
    2021-02-01 18:17

    in springboot 1.4.1.RELEASE

    spring.http.multipart.max-file-size=10MB
    spring.http.multipart.max-request-size=10MB
    spring.http.multipart.enabled=true
    spring.http.multipart.location= ..
    

    will be ok.

提交回复
热议问题