当前位置:网站首页>Upload file (post form submission form data)
Upload file (post form submission form data)
2022-06-12 06:32:00 【Stack Piston】
@RequestMapping("/importScheduling")
// public R importScheduling(@RequestParam(value = "excelFile") MultipartFile mFile) {
@RequestMapping("/importScheduling")
public R importScheduling(HttpServletRequest request) {
String jobNum = getUser().getJobNum();
MultipartFile mFile = null;
if (request instanceof StandardMultipartHttpServletRequest) {
MultiValueMap<String, MultipartFile> fileMap = ((StandardMultipartHttpServletRequest) request).getMultiFileMap();
mFile = fileMap.get("excelFile").get(0);
}
logger.info("=== Received file [{}]",mFile==null?null:mFile.getSize());
// month
String month = request.getParameter("time");
logger.info("=== Accept to month[{}]",month);
//groupId
Integer groupId = Integer.valueOf(request.getParameter("groupId"));
@ApiOperation(" Upload ")
@PostMapping("/uploads")
public R uploads(
@ApiParam(name = "file", value = " file ", required = true, type = "form")
@RequestParam("file") MultipartFile file,
@ApiParam(name = "", value = "", type = "query")
@RequestParam(name = "cwId", required = true, defaultValue = "") Integer cwId,
@ApiParam(name = "", value = "", type = "query")
@RequestParam(name = "openId", required = true) String openId,
@ApiParam(name = "hrId", value = " Number ", type = "query")
@RequestParam(name = "hrId", required = true) String hrId) {
————————————————
Copyright notice : This paper is about CSDN Blogger 「Stack Piston」 The original article of , follow CC 4.0 BY-SA Copyright agreement , For reprint, please attach the original source link and this statement .
Link to the original text :https://blog.csdn.net/CW_SZDX/article/details/123721349An error is reported when calling the upload file interface “the request was rejected because no multipart boundary was found”
solve : A file with the same name exists on the desktop ? Put it in another folder , Reselect file , It's normal .
边栏推荐
- 夜神模拟器adb查看log
- Use ms17-010 Eternal Blue vulnerability to infiltrate win7 and establish a permanent back door
- An error occurred while downloading the remote file The errormessage
- 夜神模擬器adb查看log
- LeetCode-1078. Bigram participle
- Redis configuration (IV) -- cluster
- LeetCode-2034. Stock price fluctuation
- Leetcode January 12 daily question 334 Increasing ternary subsequence
- Multithreading (V) -- Concurrent tools (II) -- j.u.c concurrent contracting (I) -- AQS and reentrantlock principles
- PDF. js FAQs
猜你喜欢

张驰课堂:2022年CAQ中质协六西格玛考试时间通知

Multithreading (V) -- concurrency tools (I) -- thread pool (II) -- related contents of ThreadPoolExecutor

Multithreading (4) -- no lock (3) -- longadder source code

Computer composition and design work06 - based on MIPS

Tips for using the potplayer video player

Cause analysis of motion blur / smear caused by camera shooting moving objects

Overview of camera image quality

Process when solving vagrant up_ builder. rb:43:in `join‘: incompatible character encodings: GBK and UTF-8

Computer composition and design work06 —— 基于MIPS

Word vector training based on nnlm
随机推荐
Trunet: short videos generation from long videos via story preserving truncation (thesis translation)
Explanation of sensor flicker/banding phenomenon
Redis queue
六月集训 第八日——前缀和
LeetCode-1303. Team size
PHP 读写 COOKIE
Reentrantlock underlying AQS source code analysis
Are you still using like+% for MySQL fuzzy query?
JS pre parsing
Bid farewell to the charged xshell, and the free function of tabby is more powerful
Video fire detection based on Gaussian mixture model and multi-color
SQL language
LeetCode-997. Find the town judge
六月集训 第五天——双指针
Qt-- realize TCP communication
Overview of camera image quality
Touch screen setting for win7 system dual screen extended display
Dlib face detection
Nocturnal simulator ADB view log
Word vector training based on nnlm