fix(commentList): 修改图片上传逻辑,使用文件对象代替base64

refactor(uploadImg): 重构图片上传方法,支持FormData方式上传
feat(upload): 添加获取上传配置的逻辑
chore: 更新构建文件和依赖版本
This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-09-08 17:16:30 +08:00
parent d8f5b53e4a
commit 6c9221aa08
14 changed files with 121 additions and 82 deletions

View File

@@ -430,7 +430,7 @@ const handleFileUpload = (event, index, i) => {
const reader = new FileReader();
reader.onload = (e) => {
const base64 = e.target.result;
uploadImg(base64).then((res) => {
uploadImg(file).then((res) => {
const obj = {
base64,
...res,
@@ -540,8 +540,7 @@ const handleInputPaste = (event, index, ii) => {
const reader = new FileReader();
reader.onload = (e) => {
const base64 = e.target.result;
uploadImg(base64).then((res) => {
uploadImg(file).then((res) => {
const obj = {
base64,
...res,