plupload

WEB版一次选择多个文件进行批量上传(swfupload)的解决方案

a 夏天 提交于 2019-11-29 12:38:00
说明:Plupload 支持多种浏览器,多种上传方式 ! 一般的 WEB 方式文件上传只能使用 FileUpload 控件进行一个文件一个文件的进行上传,就算是批量上传,也要把文件一个一个的添加到页面,无法如 windows 程序一样,一次选择多个文件进行批量上传。这样在某些应用上就显得很不人性化,有时候客户希望能够一次选择很多文件,然后让系统把选择的文 件全部上传。 本人在2010 年时使用 swfupload为核心进行文件的批量上传的解决方案。见文章: WEB版一次选择多个文件进行批量上传(swfupload)的解决方案 。 由于上一个 swfupload示例 对于 IE9 的兼容性的不太好,以及 随着HTML5 与 IE9 、 IE10 的逐渐普及,加上鉴于 swfupload 已经很久没有进行过更新等等原因,要对批量文件上传的方案要进行更新,使用新的解决方案。于是在经过一阵寻找之后,决定使用 plupload 做为核心重新写了一个批量文件上传解决方案。 Plupload 是一个 Web 浏览器上的界面友好的文件上传组件,可显示上传进度、图像自动缩略和上传分块 ,同时上传多个文件。 Plupload 的上传文件的引擎使用 Flash , Silverlight , HTML5 ,Gears, BrowserPlus 或正常 的FileUpload。

Error: Allowed memory size of 67108864 bytes exhausted

两盒软妹~` 提交于 2019-11-29 07:26:29
When I upload a picture File size: 375kb Width: 2000px Height: 3000px I get an error ERROR Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 2157 bytes) in... Why this happen, when 67108864 = 64MB? I use a shared server. My .htaccess is: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ webroot/ [L] RewriteRule (.*) webroot/$1 [L] </IfModule> where must I write php_value memory_limit 128M ? It seems you only have 64M (67108864 / 1024 / 1024) allocated to PHP. If you have access to your php.ini , increase the max memory size. You can also do it in a

前端上传组件Plupload使用指南(转发)

≡放荡痞女 提交于 2019-11-28 22:03:52
我之前写过一篇文章《 文件上传利器SWFUpload使用指南 》,里面介绍了上传组件SWFUpload的使用方法,但现在随着html5技术的逐渐推广和普及,再去使用以flash为上传手段的SWFUpload显然就有点过时了,毕竟html5原生的就给我们提供了文件上传的API。 Plupload 是一款由著名的web编辑器 TinyMCE 团队开发的上传组件,简单易用且功能强大,我们完全可以使用Plupload来代替以前的SWFUpload。 Plupload有以下功能和特点: 1、拥有多种上传方式:HTML5、flash、silverlight以及传统的<input type=”file” />。Plupload会自动侦测当前的环境,选择最合适的上传方式,并且会优先使用HTML5的方式。所以你完全不用去操心当前的浏览器支持哪些上传方式,Plupload会自动为你选择最合适的方式。 2、支持以拖拽的方式来选取要上传的文件 3、支持在前端压缩图片,即在图片文件还未上传之前就对它进行压缩 4、可以直接读取原生的文件数据,这样的好处就是例如可以在图片文件还未上传之前就能把它显示在页面上预览 5、支持把大文件切割成小片进行上传,因为有些浏览器对很大的文件比如几G的一些文件无法上传。 Plupload的使用方法也与SWFUpload非常类似,可以分为以下几步: 1、引入js文件

How to send additional data using PLupload?

我的未来我决定 提交于 2019-11-28 17:26:35
I'm using plupload to make an ajax file uploading. Now the plupload.Uploader class has many options but none are additional data. For Example : var uploader = new plupload.Uploader({ runtimes : 'gears,html5,flash,silverlight,browserplus', browse_button : 'pickfiles', container : 'contact_container', max_file_size : '10mb', url : 'upload.php', flash_swf_url : '/plupload/js/plupload.flash.swf', silverlight_xap_url : '/plupload/js/plupload.silverlight.xap', filters : [ {title : "Image files", extensions : "jpg,gif,png"}, {title : "Zip files", extensions : "zip"} ], resize : {width : 320, height :

using Plupload with ASP.NET/C#

三世轮回 提交于 2019-11-28 03:04:34
UPDATE I was able to get everything to work properly and I just wanted to post back with the updated code. I used Darin Dimitrov's suggestion on using a separate generic http handler for handling the file uploads and so this is the code I came up with for that... let me know if you have questions. <%@ WebHandler Language="C#" Class="Upload" %> using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.IO; using System.Net; using System.Web; public class Upload : IHttpHandler { public void ProcessRequest(HttpContext context) { /** * If 'newTicket' is

jQuery Plupload restrict number of uploads

戏子无情 提交于 2019-11-27 22:25:06
I have been working on this code for some time now trying to get it to work properly. I want to restrict the use from uploading more that 2 images in total. The line var upa = $('.uploader').plupload('getUploader'); it giving an error of Uncaught TypeError: Object [object Object] has no method 'plupload' var maxfiles=2; $('.uploader').each(function(){ var $uploader = $(this); $uploader.pluploadQueue($.extend({ runtimes: 'html5,flash,html4', url : '../admin/extras/upload.php', max_file_size : '2mb', chunk_size : '2mb', unique_names : true, filters : [ {title : "Image files", extensions : "jpg"}

How do I make Plupload upload directly to Amazon S3?

江枫思渺然 提交于 2019-11-27 18:23:45
How do I configure Plupload properly so that it will upload files directly to Amazon S3 ? Vebjorn Ljosa In addition to condictions for bucket, key, and acl, the policy document must contain rules for name, Filename, and success_action_status. For instance: ["starts-with", "$name", ""], ["starts-with", "$Filename", ""], ["starts-with", "$success_action_status", ""], Filename is a field that the Flash backend sends, but the HTML5 backend does not. The multipart setting must be True, but that is the default these days. The multipart_params setting must be a dictionary with the following fields:

详解利用plupload突破HTTP上传限制

故事扮演 提交于 2019-11-27 15:33:21
plupload 是一款国外的上传开源组件,官方使用PHP作为服务器语言。这篇文章主要介绍plupload的在上传大文件方面的应用。 plupload支持技术: 1:Flash 2:Gears 3:HTML 5 4:Silverlight 5:BrowserPlus 6:HTML 4 plupload主要功能: 1:突破HTTP上传限制,可上传大文件,官方论坛中有讨论上传2G文件的应用。 2:多文件队列上传 3:图片自动生成缩略图 4:上传后自动生成唯一文件名 5:自定制UI 由于plupload 确实是一个功能比较强大的组件所以无法一一介绍所有功能特色,这里主要就 网站开发 中plupload上传大文件的问题进行思路与代码的解析 。 大文件上传思路:plupload的上传思路是将一个较大的文件分成多个小块进行上传从而达到突破服务器上传限制的目的。这估计也是唯一的方法了,但本人测试过程中根据虚拟主机差异分块上传时对于可能会出现块数太多中断的原因,但这肯定是服务器的配置问题,更换服务器后该问题解决,也就是说大部分服务器均没有问题的。 下载最新版本后按照官方DEMO进行安装。 JS参数配置说明: <script type="text/javascript"> $( function () { $("#uploader").pluploadQueue({ runtimes :

Manually trigger 'open file dialog' using plupload

纵饮孤独 提交于 2019-11-27 14:45:36
问题 I'm using plupload to client scaling of pictures before they are uploaded. I like the feature that it gracefully falls back to html4 if the user doesn't have flash, silverlight etc engines installed. I want to be able to start the upload when the user clicks certain elements on the page and i want to handle the events (sometimes stopping a file dialog from opening). In fact i'd like to pop open the file dialog using javascript. Ok, so HTML4 (or rather the browser, except chrome :P) won't let

How to use the plupload package with ASP.NET MVC?

僤鯓⒐⒋嵵緔 提交于 2019-11-27 11:08:48
I am using plupload version 1.3.0 More specifically how I have to define my controller action to support chunking? Can I use the HttpPosteFileBase as a parameter? At the moment I am using the following code to initialize the plugin In the HEAD tag <link type="text/css" rel="Stylesheet" media="screen" href="<%: Url.Content( "~/_assets/css/plupload/jquery.ui.plupload.css" )%>" /> <link type="text/css" rel="Stylesheet" media="screen" href="<%: Url.Content( "~/_assets/css/plupload/gsl.plupload.css" )%>" /> <script type="text/javascript" src="<%: Url.Content( "~/_assets/js/plupload/gears_init.js" )