1 (edited by saqib 2012-04-16 15:03:54)

Topic: Plupload Server side Handler in ASP .net

kindly can any body tell me how to wirte the handler of plup upload in asp.net has anybody written it or can any body share it with me??? please   i need it urgent

Re: Plupload Server side Handler in ASP .net

Search the forums, there are a number of posts discussing this topic.

Re: Plupload Server side Handler in ASP .net

I cant find any can u post its link here i will be thankful to you

Re: Plupload Server side Handler in ASP .net

directly ask the admin or contact via mail.

Re: Plupload Server side Handler in ASP .net

that's so trouble, buy it is ok!!!

6 (edited by heidjcollns 2012-09-10 09:11:50)

Re: Plupload Server side Handler in ASP .net

Just google a while you will have it. Hope this link help you: stackoverflow.com/questions/4350686/usi … -asp-net-c

Re: Plupload Server side Handler in ASP .net

create a generic handler page, ".ashx"

in the url , general settings , write the name of your hander, in my case is  "'UploadHandler.ashx'"

 $(function () {
            $("#uploader").pluploadQueue({
                // General settings
                runtimes: 'gears,silverlight,flash,browserplus,html5',
                url: 'UploadHandler.ashx',
                ...

public class UploadHandler : IHttpHandler
    {

    public void ProcessRequest(HttpContext context)
    {

        if (context.Request.Files.Count > 0)
        {
            HttpPostedFile fileUpload = context.Request.Files[0];

            string uploadPath = context.Server.MapPath("~/documents/");
            string fileName = fileUpload.FileName;

            int chunk = context.Request["chunk"] != null ? int.Parse(context.Request["chunk"]) : 0;


            using (var fs = new FileStream(Path.Combine(uploadPath, fileName), chunk == 0 ? FileMode.Create : FileMode.Append))
            {
                var buffer = new byte[fileUpload.InputStream.Length];
                fileUpload.InputStream.Read(buffer, 0, buffer.Length);

                fs.Write(buffer, 0, buffer.Length);
            }


        }
        
       
    }

    public bool IsReusable
    {
        get { return false; }
    }
    }

Re: Plupload Server side Handler in ASP .net

how can i add a parameter so that this will serve as the new filename of the uploaded file

Re: Plupload Server side Handler in ASP .net

ryanpaulcariaga wrote:

how can i add a parameter so that this will serve as the new filename of the uploaded file

You can do so by setting multipart_params: { name: value }

Re: Plupload Server side Handler in ASP .net

thanks for the information is very usefull

Re: Plupload Server side Handler in ASP .net

At the company I work for we provide the ability for our customers to upload images for use in various areas in our software. For example there are company logos, membership photos, and header images. In today’s world image sizes can be as high as 10MB+ and trying to handle that amount of data on the servers can be too taxing for the system at times. .So I was tasked with the job to come up with an image uploading solution that handles the resizing of the images on the client side. When it was all said and done I created a .. Net user control that integrated the Adobe Flash based tool Plupload.

Re: Plupload Server side Handler in ASP .net

November 19, 2013
Multi-File Upload Using Plupload in ASP.NET
Filed under: Software Dev — Leon @ 7:34 pm

File_Upload After a failed attempt at getting multi-file upload functionality on an intranet site using the AjaxFileUpload control from the Ajax Control Toolkit I was forced to look for alternatives. The AjaxFileUpload control was designed for ASP.NET so I originally though that it would have been the ideal solution. Unfortunately, I kept getting authentication errors in certain usage scenarios on legacy browsers. As an alternative, I ended using Plupload which is used in content management systems like WordPress. While not designed specifically for ASP.NET, I found Plupload flexible enough to work well with different kinds of server side technologies as well as most browsers. The Plupload does not interfere with ASP.NET’s partial page rendering and can be used on sites with master pages. For legacy browsers, it could be configured to use it’s Flash interface or an even more basic HTML 4 interface (instead of HTML 5 which I used by default). Here is how I set it up.

Plupload requires setting up two files to work. On the client side (in the ASPX page) we need to load the appropriate JavaScript libraries and configure the plugin. On the server side, we need to handle the data stream that will be submitted from the client. There are many examples online of configuring the client side script so I won’t go into great detail here. I found the multipart_params parameter very useful for passing server side attributes for files being uploaded. I defined some of the parameters (e.g. AllowedFileTypes) on the server side to be able to be consistent later when it comes time to validate the data stream submitted from the client. Also, I found it simpler to implement the FileUploaded event handler on the client side to be able to indicate the status of the upload to the user (otherwise all uploads look successful unless something crashes on the server side).

13 (edited by mwijnands 2014-10-31 23:06:40)

Re: Plupload Server side Handler in ASP .net

For anyone wanting to use Plupload with ASP.NET MVC: I have an open source project on GitHub for helping you integrate Plupload with you ASP.NET MVC application: https://github.com/mwijnands/PluploadMvc