Execute standalone multiple files upload with auto email option. Entire applicatoin in (2) lines.
Object.dbUpload = "Files| Label | Width| SavePath| SaveAs| Overwrite| AllowExt| AllowSize| Notes| SysMessage| Attach| UploadButton"
Dim GD As New Tornado.Getdata()
Dim uf As String() = GD.Get_UploadFiles
Obj.dbMail = "From |To |Subject |SMTPserver (mini version)| Keyword | Description |
|---|---|
| Files | How many files to upload (blanks will be ignored). Each file will occupy a row. Def=3 Inputs |
| Label | Label macro of each row followed by the row number. [#] will be replaced by 1,2,3.... etc. Def="Upload File #" |
| Width | Width of the Browse Input Box. Def=45 |
| SavePath | Virtual or physical path save path. This parameter will be converted to the physical directory where files are saved. Warning: This directory path must have ASPNET write privilege like the /Tornado/Scratch directory. *** This is the only mandatory parameter *** |
| SaveAs | Save filename macro to avoid conflict (Def=#). "#" will be replaced by the original filename. You can add to filename part or extension part of filename. Normally use session.sessionid as a prefix to make the upload filename unique. |
| Overwrite | True(Def) | False - Allow overwrite of old files. |
| AllowExt | Allow Extension of upload files separated by a [.] period. [*] allows all extensions. Def=jpg.jpe.jpeg.gif.png.txt.Doc.xls.ppt.pdf. |
| AllowSize | Max allowable size of upload file (avoid server attack). Def=1 MB. |
| Notes | Display on line upload restriction notes. Def=True |
| Message | Add a message box after Upload button ot the Notes box. |
| Attach | Attach all uploaded file to the Auto Email in the To: format of add1;add2;.... Def=False |
| UploadButton | Full path of Upload Image button or use system button path if no "/" in filename. Def=System Upload button. |
| SysMessage | Suppress system message output. Def=True |
| Get_UpoloadFiles | Returns a string array of the uploaded file names. |
<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.dbQP = "U=1|S=5|Th=Ti=Upload Demo"
up.dbUpload = "SavePath=/tornado/scratch/"
'...Send Email Notification to this address(es) upon Upload files > 0
up.dbMail = "From=Me@aspdb.com | Subject=Upload Grid Report | SMTP=email_server| To=addr_1;_addr_2"
up.ASPdbUpload()
Dim uf As String() = GD.Get_UploadFiles
If Not IsNothing(uf) Then
Dim i As Integer
For i = 0 To UBound(uf)
Response.Write(uf(i) & "<br>")
Next
End If
End Sub
</script>
z Class | Tornado Namespace | ASPdbUpload | dbMail | ASPdbSendMail