当前位置:网站首页>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 
边栏推荐
- Binder面试之:内存管理单元
- 使用pytorch和tensorflow计算分类模型的混淆矩阵
- Binder interview: memory management unit
- What are the advantages of e-mail marketing? Why do sellers of shopline independent station attach so much importance to it?
- 数据中台:数据治理的七把利剑
- CSI以及本地盘的相关实现记录
- Oracle condition, circular statement
- Official answers to the "network security" competition questions of the 2022 national vocational college skills competition
- Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException:异常解决
- sklearn 特征工程(总结)
猜你喜欢
![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]

At first glance, I can see several methods used by motionlayout

Data middle office: six questions data middle office

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

Drop down box for implementation

深度學習19種損失函數

容量调度绝对值配置队列使用与避坑

5g network overall architecture

The windows environment redis uses AOF persistence and cannot generate an AOF file. After generation, the content of the AOF file cannot be loaded

Use of JDBC
随机推荐
What is the e-commerce conversion rate so abstract?
mac下安装多个版本php并且进行管理
YYGH-6-微信登录
使用pytorch和tensorflow计算分类模型的混淆矩阵
猿粉猿动力-开发者活动袭!
【无标题】
Shanghai Yuge ASR CAT1 4G module 2-way low power 4G application
What are the advantages of e-mail marketing? Why do sellers of shopline independent station attach so much importance to it?
Qtcanpool knowledge 07:ribbon
Capacity scheduling absolute value configuration queue usage and pit avoidance
cocoapod中的第三方库怎么引用本地头文件
数据中台:AI中台的实施与总结
Jenkins持续集成1
Maskrcnn, fast RCNN, fast RCNN excellent video
[CAD drawing Video] AutoCAD 2014 master's way
YYGH-BUG-03
Jenkins continues integration 2
Openharmony gnawing paper growth plan -- json-rpc
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance
数据中台:数据治理的七把利剑