Web Tools and Component: File Upload, Flash Chart, Flash Stars Rating, Flash Calendar

 
JOBDAO HOME Products Download Purchase Support

  JobdaoUpload File Upload component - User Manual

System Requirements | Install | Reference | FAQs

Reference


You can get more detail for programmer reference by clicking the object link below.

Object Properties Methods
Upload Item, Count, MaxSize, PageCode, About  
UploadFile Name, Content, FileName, FilePath, Size, ContentType, FileExt SaveAs


Why wait? Put JobdaoUpload to work now! Upload a few files to our server using the demo applications.
Just click here you can view the live demo and its sample source code.

 

UploadFile Object


Encapsulates functionality pertaining to individual uploaded files.

Get the uploaded file object:

Set jdupload = Server.CreateObject("JobdaoUpload.Upload")
Set jdfile=jdupload("file")

 

Name Property
This property returns the field name of the uploaded file in the POST form. Read Only

Usage:

Set jdupload = Server.CreateObject("JobdaoUpload.Upload")
Set jdfile=jdupload("file")
Response.Write ("The file field name is " & jdfile.Name)

 

Content Property
This property returns the contents of the uploaded file in String format. Read Only

Usage:

Set jdupload = Server.CreateObject("JobdaoUpload.Upload")
Set jdfile=jdupload("file")
Response.Write (jdfile.Content)

FileName Property
This property returns the user's original name for the uploaded file, not including any path information. Read Only

For example, if a user uploads a file from the following path on their hard drive: "C:\jobdao\filename.txt", the FileName property will return "filename.txt".

Usage:

Set jdupload = Server.CreateObject("JobdaoUpload.Upload")
Set jdfile=jdupload("file")
Response.Write ("The original file name is " & jdfile.FileName)

 

FilePath Property
This property returns the user's original path for the uploaded file. Read Only

For example, if a user uploads a file from the following path on their hard drive: "C:\jobdao\filename.txt", the FilePath property will return "c:\jobdao\".

Usage:

Set jdupload = Server.CreateObject("JobdaoUpload.Upload")
Set jdfile=jdupload("file")
Response.Write ("The upload path is " & jdfile.FilePath)

 

Size Property
This property returns the file size for the uploaded file, in bytes. Read Only

Usage:

Set jdupload = Server.CreateObject("JobdaoUpload.Upload")
Set jdfile=jdupload("file")
Response.Write ("The size of upload file is " & jdfile.Size)

 

ContentType Property
This property contains the MIME Content Type of the file, which is useful in determining the contents of the file. Read Only

Usage:

Set jdupload = Server.CreateObject("JobdaoUpload.Upload")
Set jdfile=jdupload("file")
Response.Write ("The content type of upload file is " & jdfile.ContentType)

 

FileExt Property
This property returns the extension of uploaded file. Read Only

Usage:

Set jdupload = Server.CreateObject("JobdaoUpload.Upload")
Set jdfile=jdupload("file")
Response.Write ("The extension of upload file is " & jdfile.FileExt)

 

SaveAs Method (Fullpath As String, IsOverwrites As Boolean)
Saves the file under the name specified by Path.

Usage:

Set jdupload = Server.CreateObject("JobdaoUpload.Upload")
Set jdfile=jdupload("file")
fm_path=Server.mappath("../uploadfile")
filename=jdfile.FileName
jdfile.saveas fm_path & "/" & filename, true
 

Copyright © 2006-2007 Jobdao. All Rights Reserved.