Uploadify:定义最大图像宽度和高度 [英] Uploadify: Defining maximum image width and height

查看:122
本文介绍了Uploadify:定义最大图像宽度和高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想限制上传图片的最大宽度和/或高度(jpg,png,gif,bmp,...)。如何使用Uploadify完成?

I want to restrict the maximum width and/or height of an uploaded image (jpg, png, gif, bmp, ...). How can this be done with Uploadify?

我可以想到两种一般可能性:

I can think of two general possibilities:


  • 检查上传前的图片尺寸并输出错误

  • 上传后调整尺寸图片

你是如何使用uploadify完成的?

How have you done this with uploadify?

现在我能想到的唯一方法是扩展 uploadify.php 然后调整图像大小。这里的问题是不同的图像应该有不同的图像大小限制...

The only way now I can think of is to extend the code in uploadify.php and resize the image afterwards. The problem here is that different images should have different image size limits ...

推荐答案

在sizeLimit中检查此选项....

check this option in sizeLimit ....

http://stayinsanvicente.com/主页/代码/ customizing-uploadify

//'sizeLimit' : 1024*1024, //1 MB limit
//'sizeLimit'   : 800*800,
'sizeLimit'   : 5120*5120,

这篇关于Uploadify:定义最大图像宽度和高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆