当前位置:网站首页>YYGH-BUG-03
YYGH-BUG-03
2022-06-28 05:57:00 【Xiao Zhao】
Today, I am working on a picture uploading system , When integrating qiniu cloud, an error is reported when uploading a file
org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$FileSizeLimitExceededException: The field file exceeds its maximum permitted size of 1048576 bytes.
By analyzing the problem, we know that this is because , The uploaded picture is too big
At this time, the scanning needs to modify the configuration file
spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=10MB
Now we need to upgrade the production business by adding a randomly generated image to the image uuid
String uuid = UUID.randomUUID().toString().replace("-", "");
String fileName = uuid + file.getOriginalFilename();
Then store the files in the folders corresponding to the dates
String uuid = UUID.randomUUID().toString().replace("-", "");
String fileName = uuid + file.getOriginalFilename();
String timeUrl = new DateTime().toString("yyyy/MM/dd");
fileName = "/" + timeUrl + "/" + fileName;
Response response = uploadManager.put(file.getInputStream(), fileName, upToken, null, null);
Insert picture description here 
The picture cannot be recognized and opened in the user upload system , debugging 
He found that he spliced a route and checked the database url There is a problem http:// Less //
Look up the data and find 
change 

All right
Now the service_oss The code of 
边栏推荐
- numpy. reshape, numpy. Understanding of transfer
- Binder面试之:内存管理单元
- Codeworks 5 questions per day (1700 for each)
- Drop down box for implementation
- 马赛克数据增强 mosaic
- 学术搜索相关论文
- Data midrange: implementation and summary of AI midrange
- Qtcanpool q05: no border
- Flink window mechanism (two waits and the last explanation)
- UICollectionViewDiffableDataSource及NSDiffableDataSourceSnapshot使用介绍
猜你喜欢

Jenkins continues integration 2

qtcanpool 知 07:Ribbon
![Video tutorial on website operation to achieve SEO operation [21 lectures]](/img/1f/9ae2ed5bfec5749c764630d1daccea.jpg)
Video tutorial on website operation to achieve SEO operation [21 lectures]
![Taobao seo training video course [22 lectures]](/img/81/21e844542b35010760d061abe905e9.jpg)
Taobao seo training video course [22 lectures]

Xcode13.3.1 项目执行pod install后报错

Valueerror: iterative over raw text documents expected, string object received

开发者的时代红利在哪里?

What is the e-commerce conversion rate so abstract?

Sharing tips for efficient scripting

Codeworks 5 questions per day (1700 for each)
随机推荐
解决ValueError: Iterable over raw text documents expected, string object received.
什么是WebRTC?
pytorch dataloader的长度 epoch与iteration的区别
一看就会 MotionLayout使用的几种方式
Important basis for ERP software company selection
脚本语言和编程语言
mysql常用函数
The length of pytorch dataloader the difference between epoch and iteration
CSI以及本地盘的相关实现记录
Prime mover × Cloud primordial is making sound, reducing cost and increasing efficiency lecture hall
Jenkins continues integration 2
Typescript interface
Valueerror: iterative over raw text documents expected, string object received
Oracle fundamentals summary
Lenovo hybrid cloud Lenovo xcloud, new enterprise IT service portal
Where is the era bonus for developers?
Flink 窗口机制 (两次等待, 最后兜底)
安装 Ffmpefg
lombok @EqualsAndHashCode 注解如何让对象.equals()方法只比较部分属性
Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException:异常解决