咕噜是个大胖子 2018-01-05 07:58 采纳率: 0%
浏览 2158
已采纳

Plupload 前端预览大图片导致网页崩溃

目前整个项目后台是javaSSM框架,前端利用plupload进行图片上传、上传服务器前会进预览显示
代码如下:利用mOxie对象进行预览,上传小图片时预览没有任何问题,但是当一次性上添加多张10M左右图片时,其中几张会预览出来,然后接着网页就会崩溃了,,求帮忙

图片说明

  • 写回答

3条回答

  • threenewbee 2018-01-05 10:28
    关注

    10M的图片也太大了一点,一般数码相机、手机拍摄的也就几兆。

    http://www.plupload.com/docs/v2/Image-Resizing-on-Client-Side
    官方文档说了

    Obviously client-side and specifically browser environment cannot be as powerful (not yet at least) as the server-side might be. So somewhere there must be a limitation on the resolution that might be handled in the browsers or their add-ons. We assume it to be 6500 by 6500 pixels (about 42MP). I say assume, because there's no way to figure out the actual top line or detect when browser (or its add-on) runs out of memory - if this happens it simply hangs (the best case). So we came up with the safe margin, where browser can still reliably operate (read - breathe) and if either side of the image is larger than that margin, Plupload will simply bail out and upload the image as is, without any tampering.

    最大不超过6500x6500像素,否则会内存溢出。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题