当前位置:网站首页>项目上传部分
项目上传部分
2022-04-23 07:27:00 【桑英豪】
OSS 通用上传接口
/** * OSS文件上传 * @param file * @return */ @PostMapping("/uploadFileByOSS") public ResultJson uploadFileByOSS(MultipartFile file){ try { QueryWrapper<OssConfig> ossConfigQueryWrapper = new QueryWrapper<>(); ossConfigQueryWrapper.last("limit 1"); OssConfig ossConfig = ossConfigService.getOne(ossConfigQueryWrapper); return ResultJson.ok(OssUtils.alibabaUploadFile(file, ossConfig)); } catch (Exception e) { log.error(e.getMessage()); return ResultJson.failure(ResultCode.BAD_REQUEST, e.getMessage()); } }html添加部分
<el-form-item prop="thumbnail" label="缩略图" :label-width="dialogFormLabelWidth" style="width:325px"> <span> <img width="100%" :src="uploadUrlPath" alt=""> </span> <el-upload drag :action="uploadOSS" :on-success="handleUploadSuccess" :before-upload="handleBeforeUpload" :on-error="handleUploadError" name="file" :show-file-list="false" :headers="headers" > <i class="el-icon-upload"></i> <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> </el-upload> </el-form-item>
![]()
![]()
![]()
版权声明
本文为[桑英豪]所创,转载请带上原文链接,感谢
https://blog.csdn.net/m0_62902168/article/details/124351929
边栏推荐
- Talk about the basic but not simple stock data
- freertos学习02-队列 stream buffer message buffer
- 二维01背包
- 获取TrustedInstaller权限
- 单点登录 SSO
- Green apple film and television system source code film and television aggregation film and television navigation film and television on demand website source code
- 刨析——浏览器如何工作
- An article understands variable lifting
- The simple problem of leetcode is to calculate the numerical sum of strings
- Online app resource download website source code
猜你喜欢

WordPress love navigation theme 1.1.3 simple atmosphere website navigation source code website navigation source code

Brief description of CPU

Search the complete navigation program source code

Community group purchase applet source code + interface DIY + nearby leader + supplier + group collage + recipe + second kill + pre-sale + distribution + live broadcast

LeetCode-199-二叉树的右视图

LeetCode簡單題之計算字符串的數字和

监控智能回放是什么,如何使用智能回放查询录像

浅谈ES6尾调优化

Briefly describe the hierarchical strategy of memory

Draw a circle quickly in MATLAB (the one that can be drawn directly given the coordinates and radius of the center of the circle)
随机推荐
情境领导者-第七章、解决绩效问题
Online app resource download website source code
将实例化对象的方法 给新的对象用
Talk about the basic but not simple stock data
LeetCode简单题之统计字符串中的元音子字符串
ASAN 极简原理
The simple problem of leetcode is to calculate the numerical sum of strings
LeetCode-199-二叉树的右视图
Why are there 1px problems? How?
LeetCode中等题之旋转函数
Samsung, March to the west again
Draw a circle quickly in MATLAB (the one that can be drawn directly given the coordinates and radius of the center of the circle)
idea:使用easyYapi插件导出yapi接口
社区团购小程序源码+界面diy+附近团长+供应商+拼团+菜谱+秒杀+预售+配送+直播
LeetCoed18. Sum of four numbers
使用JWT生成与解析Token
Qt编译QtXlsx库
Penetration test interview collection -- HVV---
CGM优化血糖监测管理——移宇科技亮相四川省国际医学交流促进会
Qtablewidget header customization and beautification developed by pyqt5 (with source code download)

