How to use

To use uploader control you need to register httphandler in web.config.

<add path="Uploader.axd" verb="*" type="Manic.Controls.UploaderHandler" validate="false" />

After you register control place Uploader.swf file in your project or web site.



Properties
  • FlashFilePath
  • UploadFolder
  • FlashWidth
  • FlashHeight
  • MaxFileSize
  • MaxFileNumber

Code example

<manic:Uploader ID="manUpload" runat="server" FlashFilePath="../Flash/Uploader.swf" UploadFolder="~/Files/" FlashWidth="800" FlashHeight="200" />

File filters

To set up file filters for control add FileFilter to FileFilters property.

Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
    If Not IsPostBack Then
        Me.myControl.FileFilters.Add(New Manic.Controls.Objects.FileFilter("Web Images (*.jpg, *.png, *.gif)", "*.jpg; *.png; *.gif"))
        Me.myControl.FileFilters.Add(New Manic.Controls.Objects.FileFilter("Archive Files (*.zip, *.rar)", "*.zip; *.rar"))
    End If
End Sub

User rights on folder

Please make sure that your upload folder is writable or your upload will not be successful.

Examples

You can see a working examples here:
http://services.4ants.ba/controls/samples/uploader/

For testing purposes file size is limited to 100kb and you can upload maximum 5 files at once.

Last edited Feb 8, 2010 at 4:12 PM by ManicStudio, version 11

Comments

No comments yet.