Files Upload

Files upload is mandatory in content management. With Tornado's file upload, you can control The SavePath, Overwrite, File Extensions, File size and Notes. Upon a successful upload (Files uploaded > 0), you have the option to send a notification email to an Email Address.

The following example let you specify your own notification email address for your uploads (max. 25K each). Upon a successful upload, it'll present an <A HREF...> for you to view your own file.

<!--T_Upload.aspx-->

<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
   Dim GD As New Tornado.Getdata()
   Dim up As New Tornado.Z()
   up.dbSkin = "Tornado"
   up.dbTextHolder = "Title=Tornado Upload with Auto Email| UP6=<TR><TD class=GH>Your Email Address</td><td class=NR><INPUT SIZE=45 NAME='ADDR'></td></tr>"
   up.dbUpload = "SavePath=/tornado/scratch/| AllowSize=25000"
   dim emailaddr as string="fk@fkw.us"
'...Send EMail Notification to this address upon Upload files > 0
   if request.form("ADDR")<>"" then emailaddr=request.form("ADDR")
   up.dbMail = "From=support@aspdb.com | Subject=Upload Report | SMTPserver=Your_SMTP_Server| To=" & emailaddr
   up.ASPdbUpload()
'...Display upload files as HREF as an example
   Dim uf As String() = GD.Get_UploadFiles
   If Not IsNothing(uf) Then
      Dim i As Integer
      Response.Write("Your uploaded files - <P>")
      For i = 0 To UBound(uf)
         Response.Write("<A target='_blank' HREF='/tornado/scratch/" & uf(i) & "'>" & uf(i) & "</a><BR>")
      Next
   End If
End Sub
</script>

Wonder what is this parameter? -> UP6=<TR><TD class=GH>Your Email Address</td><td class=NR><INPUT SIZE=45 NAME='ADDR'></td></tr>

This is part of the TextHolder parameters that you can insert text in Tornado's output. In this case, you can insert a user email input at th ebottom Upload output table (you have options to insert at the top also). Now you can see that Tornado is not a closed end system. You can either define your own template or you can just simply insert your own text in the output.