plupload

How to send additional data using PLupload?

走远了吗. 提交于 2019-11-27 10:29:43
问题 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",

Unable to pass additional parameters in plupload

六月ゝ 毕业季﹏ 提交于 2019-11-27 05:31:43
I'm using plupload, the JQuery UI implementation. I'm trying to pass additional parameters to the server, but I can't make it work. It should be pretty straightforward, the parameters are already set when the function is executed, so that should not be a problem. I've tried this: function GetPlUploader(m) { $("#divOpplaster").plupload( { // General settings runtimes: 'flash,html5,silverlight', url: 'upload.php', max_file_size: '10mb', chunk_size: '1mb', unique_names: true, multipart: true, multipart_params: [ { 'ordre': ordreibruk, 'mode': m} ], // Specify what files to browse for filters: [ {

Handling plupload's chunked uploads on the server-side

那年仲夏 提交于 2019-11-27 01:37:25
When I use plupload to chunk files (setting option chunk_size ), I get a separate PHP request for each chunk. Looking at $_FILES variable, each chunk is of type "application/octet-stream" . Is there any simple, standard and comfortable way how to combine these pieces in PHP at server-side? With sanity guaranteed (e.g. when one of the pieces is missing etc.). Here is the way to parse the chunks, and store the result in $upload_file (change $uploaded_file to match what you need). $uploaded_file = '/tmp/uploadFile.jpg'; $chunks = isset($_POST["chunks"]) ? $_POST["chunks"] : 0; // If we have a

jQuery Plupload restrict number of uploads

感情迁移 提交于 2019-11-26 23:09:24
问题 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 :

How do I make Plupload upload directly to Amazon S3?

不打扰是莪最后的温柔 提交于 2019-11-26 19:25:01
问题 How do I configure Plupload properly so that it will upload files directly to Amazon S3? 回答1: 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

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

让人想犯罪 __ 提交于 2019-11-26 15:26:23
问题 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

How to upload large files using MVC 4?

跟風遠走 提交于 2019-11-26 12:38:27
问题 I had it working.. but I noticed once the files I was uploading get bigger (around 4000k) the controller would not be called.. So I added in chunking which fixed that problem.. but now when I open the file its full of garbage characters... So what is the correct way to upload large files with plupload/MVC 4 ? Here is my current code $(document).ready(function () { var uploader = new plupload.Uploader({ runtimes: \'html5\', browse_button: \'pickfiles\', container: \'container\', // max_file

Handling plupload&#39;s chunked uploads on the server-side

怎甘沉沦 提交于 2019-11-26 09:45:44
问题 When I use plupload to chunk files (setting option chunk_size ), I get a separate PHP request for each chunk. Looking at $_FILES variable, each chunk is of type \"application/octet-stream\" . Is there any simple, standard and comfortable way how to combine these pieces in PHP at server-side? With sanity guaranteed (e.g. when one of the pieces is missing etc.). 回答1: Here is the way to parse the chunks, and store the result in $upload_file (change $uploaded_file to match what you need).