Springboot上传文件报错
Failed to parse multipart servlet request; nested exception is java.io.IOException: The temporary upload location [/data/upload_tmp/work/Tomcat/localhost/ROOT] is not valid
首先保证设置的临时目录有权限访问,然后进行如下配置:
解决方法一
配置server.tomcat.basedir
:
server:
tomcat:
basedir: /data/upload_tmp
解决方法二
启动脚本修改
-Djava.io.tmpdir=/opt/tridion/deployer-live/tmp
参考:
- SpringBoot文件上传异常之提示The temporary upload location xxx is not valid;
- Temporary upload location is not valid;
最新评论
本来在正常下载,突然就不能下载,并出现报错:a socket operation was attempted to an unreachable network。请问是什么原因呢
试了,还是不行,能不能更新一下
试了,确实不行,能不能更新一下
也推荐一下我自己写的 https://twitdown.com