Comments (9)
这样传过去就是base64的值
from vue-cropper.
大神可知道如何获取,java后台
from vue-cropper.
http://blog.csdn.net/hopperpanda/article/details/52813496
from vue-cropper.
有没有其它的方式获取这个图片啊
from vue-cropper.
blob 表单提交也可以
from vue-cropper.
获取截图的blob数据
this.$refs.cropper.getCropBlob((data) => {
// do something
console.log(data)
})
看到了:)
from vue-cropper.
现在不知道后台如何获取了
from vue-cropper.
可以塞到formdata 里面用表单提交过去
from vue-cropper.
对的,已经成功了,谢谢了:)
this.$refs.cropper.getCropBlob((data) => {
this.$refs.avatarForm.reset();
let formdata = new FormData();
formdata.append('imgStream',data);
let config = {
headers:{'Content-Type': 'multipart/form-data' //之前说的以表单传数据的格式来传递fromdata
}
};
this.$post(`${this.$url}/teacher/uploadFileToQiniu`,formdata,config)
.then(res=>{
})
.catch(err=>{
})
})
@PostMapping("/uploadFileToQiniu")
public String uploadFileToQiniu(@RequestParam("imgStream") MultipartFile imgStream) throws IOException {
AjaxResult result = new AjaxResult();
InputStream content = imgStream.getInputStream();
qiniuService.uploadFile(content);
result.setMsg("上传成功");
result.setSuccess(true);
return JSON.toJSONString(result);
}
from vue-cropper.
Related Issues (20)
- fillColor,背景颜色无效 HOT 1
- 使用腾讯云cos的图片路径,图片显示不出来 HOT 1
- 拖动报错:vue-cropper.js?v=1c3e2802:648 Unable to preventDefault inside passive event listener invocation. HOT 3
- centerBox开启状态,无法缩小图片 HOT 2
- 关于vitePress打包时报错这个问题? HOT 1
- 版本号 0.6.4 limitMinSize配置不生效 HOT 1
- 跨域的问题:nginx 应该怎么设置呢?我已经给出了最宽松权限。 HOT 1
- 移动端无截图框时enlarge失效 HOT 2
- vue3.0版本缩放问题 HOT 3
- 放大后无法缩小回初始大小 HOT 2
- png格式的图片设置截图框的宽高比例不生效
- 大佬们,nuxt3怎么使用,求解答 HOT 2
- vite 打包报错 HOT 4
- 群二维码过期了
- 组件不显示 HOT 3
- iPhone手机UC浏览器、夸克浏览器有问题
- vite项目打包报错any类型
- 未设置背景色,看文档是默认为空的,但是在处理横版图片的时候,背景变成了黑色 HOT 1
- 查看演示demo报错 HOT 3
- 版本0.6.4无法按照文档Vue3全局导入CSS样式 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-cropper.