图片上传错误。
来源:6-4 基于七牛云的图片上传_上云1
慕雪9313484
2018-02-27
七牛上传时总提示临时目录错误,Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.io.IOException: The temporary upload location [C:\Users\coban\AppData\Local\Temp\tomcat.7396538140782416150.8080\work\Tomcat\localhost\ROOT\tmp\xunwu\images] is not valid] with root cause。看了一下是临时目录下缺少tmp\xunwu\images路径,代码没看到修改临时路径的地方,老师能指点下吗?
写回答
1回答
-
瓦力老师
2018-03-01
亲,你是不是在向本地磁盘保存呢,如果是本地磁盘保存的话,是需要预先创建目录的,课程中有示例向本地保存,然后转而直接上传到七牛云,请仔细看下区别哈。祝亲学习愉快^_^
10
相似问题