- 积分
- 33381
- 金币
- 1389 个
- 社区币
- 2000 元
管理员
- 贡献
- 2074 点
- 金币
- 1389 个
|
打开:static/js/mobile/buildfileupload.js
删除下边代码,后台和浏览器更新缓存即可- if(imgwidth/imgheight <= canvaswidth/canvasheight && imgheight >= canvasheight) {
- newheight = canvasheight;
- newwidth = Math.ceil(canvasheight/imgheight*imgwidth);
- } else if(imgwidth/imgheight > canvaswidth/canvasheight && imgwidth >= canvaswidth) {
- newwidth = canvaswidth;
- newheight = Math.ceil(canvaswidth/imgwidth*imgheight);
- }
复制代码
注意,手机图片像素大,GD库可能无法处理导致上传失败,所以,可以考虑提高最大高度和宽度的限制,而不一定传原图,教程如下(未进行上边的删除的情况下)
打开:static/js/mobile/buildfileupload.js
找到
- var maxheight = 500;
- var maxwidth = 500;
复制代码 调大数字
|
|