plupload

plupload - send another request parameter with uploaded file

元气小坏坏 提交于 2019-12-18 04:34:20
问题 plupload creates nice ids in file object. How this id can be sent to the upload script? The upload script has 3 variables in $_POST - file name, chunk number and total number of chunks. How to add another parameter to plupload's POST request (in my case, the file.id)? 回答1: The first step would be to add a handler to the BeforeUpload event. Then, if you are using multipart, you can change the uploader settings to dynamically set different multipart params: plupload_instance.bind('BeforeUpload'

using Plupload with ASP.NET/C#

别等时光非礼了梦想. 提交于 2019-12-17 17:25:50
问题 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

Unable to pass additional parameters in plupload

杀马特。学长 韩版系。学妹 提交于 2019-12-17 07:51:31
问题 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,

Unable to pass additional parameters in plupload

人走茶凉 提交于 2019-12-17 07:51:06
问题 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,

Upload multiple files to Amazon S3 using plupload

强颜欢笑 提交于 2019-12-13 05:51:49
问题 I'm using plupload to upload images to Amazon S3. I have a method on the server which generates my signature and policy, which I call through Http GET. This works just fine for uploading one filet at a time. The problem is when I select multiple files to upload. I need to call my server method GetPolicy before each file upload, but the problem is that the upload sometime starts before I get the Response from GetPolicy . Here's a bit of code: uploader.bind("FileFiltered", function (up, file) {

“Uncaught TypeError: Cannot read property 'open' of undefined” - after calling “.start();” - plupload

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 05:14:59
问题 Using plupload, I get the following error when calling .start(). From this line: I am using RequireJS to handle the libary. Using latest version (v2.1.2). My code: How my script looks like: define(['jquery', 'plupload'], function($) { /** * Init */ uploader = new plupload.Uploader({ runtimes: 'html5,flash,silverlight,html4', // gears,html5,flash,silverlight,browserplus browse_button: 'uploadProfileImage', max_file_size: '2mb', url: ajax + 'uploadImage&temp=1', flash_swf_url: website_url +

How to load a PDF into a blob so it can be uploaded?

大城市里の小女人 提交于 2019-12-12 14:08:58
问题 I'm working on a testing framework that needs to pass files to the drop listener of a PLUpload instance. I need to create blob objects to pass inside a Data Transfer Object of the sort generated on a Drag / Drop event. I have it working fine for text files and image files. I would like to add support for PDF's, but it seems that I can't get the encoding right after retrieving the response. The response is coming back as text because I'm using Sahi to retrieve it in order to avoid Cross-Domain

plupload should save large and small image

£可爱£侵袭症+ 提交于 2019-12-11 18:24:42
问题 I am using plupload to save multiple images, I want to store same image with 2 sizes, small image for thum and large image to display in large. How plupload will store 2 sizes of images? 回答1: It is easier implementing what you need in the server side... For the plupload; you can make use of the function: resize : {width : 500, height : 600, quality : 90}, You should be able to achieve what you need if you also made use of the events such FileUploaded to reupload the same uploaded file but

Plupload get uploader object (v2.1.2) for file reader

孤人 提交于 2019-12-11 10:35:40
问题 I'm trying to read the selected file with HTML5 File Reader. FilesAdded: function(up, files){ try{ var file = jQuery('#'+uploader.id+'_html5').get(0).files[0]; var reader = new FileReader(); reader.onload = function () { preview.find('.text').fadeOut('fast', function(){ $(this).siblings('img').prop({src: reader.result}).fadeIn('fast'); }); } reader.readAsDataURL(file); uploader.refresh(); } catch(e) { console.log(e.message); } }, In the older versions of the plupload i could get the uploader

Plupload upload filename issues

两盒软妹~` 提交于 2019-12-11 09:22:46
问题 I have been successful in porting over plupload into Codeigniter, but when a user uploads a file, the filename comes out like this: _1, _2, _3, etc. What could be causing this error? Here is my CodeIgniter Controller: function do_upload($fileName) { // Settings $targetDir = getcwd() . "/uploads/"; $cleanupTargetDir = false; // Remove old files $maxFileAge = 60 * 60; // Temp file age in seconds // 5 minutes execution time @set_time_limit(5 * 60); // usleep(5000); // Get parameters $chunk =