完整的多个HTML5上传器,可以拖放,调整大小和重命名

时间:2012-10-16 06:49:28

标签: php html5 upload drag-and-drop image-resizing

我目前正在为一个有行政管理的空手道学校创建一个网站,但我仍然坚持“添加照片”部分。

我想知道如何使用drag& amp;创建一个完整的HTML5图片上传器。删除功能,调整大小以制作缩略图,并重命名图片以符合PHP规范。

以下是我对上传者的说明:

-> Drag and Drop from a local folder
-> If the image is not the correct ratio, provide a image cropping. (Like Twitter)
-> Resizing like this:
    -> Detect the aspect ratio (4:3 / 16:9)
    -> Create a thumb of 40% of the size
-> Create 2 files in the "Uploads" folder
    -> {a random ID}.{png,jpg,gif,etc...} (full size)
    -> {the same ID-thumb.{the same ext} (thumbnail)

我想仅使用JS和PHP创建它。我在这个应用程序中使用Zend Framework。

我希望在PHP和HTML5中这是可能的,但我还没有尝试任何东西。我不想浪费时间,因为我付了钱,所以时间就是现金!

1 个答案:

答案 0 :(得分:1)

对于HTML上传,您肯定可以使用plupload,我已经使用过它并且运行正常。

为了重新调整大小和拇指生成,您可以创建自定义功能并对其进行集成 进入plupload或者可以去ffmpeg