Using FileUploader in Medium Mode

This article show how to use Mediachase FileUploader in medium mode

In Medium and Full modes you are using Http Module McHttpModule, which allows control over upload progress.

[View Sample C#] [View Sample VB.NET]

Medium mode allows simultaneous use of both standart and FileUploader controls on the same page.

Following steps will allow to use Mediachase FileUploader in Medium mode:

  • Steps from Simple Mode
  • Add new http module to your project, for that add following lines into web.config

    In configuration section:
      <configSections>
    	<section name="Mediachase.FileUploader.McHttpModule" 
    	type="Mediachase.FileUploader.McHttpModule, 
    	Mediachase.FileUploader"/>
      </configSections>
    
      <Mediachase.FileUploader.McHttpModule>
      </Mediachase.FileUploader.McHttpModule>
    
    In system.web section:
    <httpModules>
    	<add name="Mediachase.FileUploader.McHttpModule" 
    	type="Mediachase.FileUploader.McHttpModule, Mediachase.FileUploader" />
    </httpModules>
    
    In medium mode you can add httpPost tag into Mediachase.FileUploader.McHttpModule section:
    <httpPost BufferSize="65536" MaxSize="40" Redirect="http://www.mediachase.com"/>

    BufferSize Attribute - specifies buffer size in bytes, which Mediachase.FileUploader will use to process request. You can change this value for better optimization. By default it is set to 65536 bytes.

    MaxSize Attribute – specifies maximum size for POST request in kilobytes. If request is larger or other exception is generated, you will be redirected to the page specified in Redirect attribute. By default there is no limitation for POST request. The checking is done before ASP.NET process starts. You can also control POST request using standart ASP.NET httpRuntime section and maxRequestLenght atrribute.

    All attributes can be combined.


Copyright 2005 Mediachase. All rights reserved.