upload - 元素ui上传组件不发送流数据
问题描述
使用 el-upload 组件上传图片
我从服务器收到 204 no content response
el-upload(
action="https://s3-us-west-1.amazonaws.com/stage.greenausm.com",
:mulitple="false",
:data="xhrData"
:show-file-list="false", :on-success="handleAvatarSuccess",
:before-upload="beforeAvatarUpload",
)
对服务器的请求没有图像数据
------WebKitFormBoundaryksB7UzZHz8SWLdPk Content-Disposition: form-data; 名称=“文件”;文件名="img.jpg" 内容类型:图像/jpeg
------WebKitFormBoundaryksB7UzZHz8SWLdPk--
如何让组件发送图像数据
解决方案
handleChange(file, fileList){
this.fileList.push(file);
},
:on-change="handleChange"
:file-list="ListFiles"
推荐阅读
- postgresql - 位置参数元组的替换索引 1 超出范围为什么会出现此错误?
- ruby-on-rails - 修改字符串的更简单方法
- swift - Swift:保持对弱变量的强引用
- python - 烧瓶重定向到错误的链接
- mysql - IIS - 在 Xampp 上使用 MySql
- amazon-web-services - terraform 通过从另一个存储桶复制设置来创建 Amazon S3 存储桶
- python - 如何阅读分栏(杂志和报纸)的pdf文档?
- ios - 旋转角度时clampedToExtent()不起作用
- protocol-buffers - Golang cloudEvent和proto之间的时间数据类型不匹配
- python - Python 数据表 fread 显式文件目录