|
TotalMaxFileSize
The TotalMaxFileSize property contains the maximum allowed
size of all files to be uploaded. If this property is null then there is no limit for the
total file's size uploaded. By default this property is null. If there is a key in the
Registry corresponding to this property, then it keeps the string value of this key.
Syntax
.TotalMaxFileSize
Registry
Key : HKEY_LOCAL_MACHINE\SOFTWARE\Advantys\aspSmartUpload
Value : TotalMaxFileSize
Return Value
Returns a Long value.
Example
<%
MyUpLoad.TotalMaxFileSize = 100000
Response.Write("TotalMaxFileSize=" & MyUpLoad.TotalMaxFileSize
& "<br>")
%> |
MaxFileSize
The MaxFileSize property contains the maximum allowed size
of one file to be uploaded. If this property is null then there is no limit for the file's
size uploaded. By default this property is null. If there is a key in the Registry
corresponding to this property, then it keeps the string value of this key.
Syntax
.MaxFileSize
Registry
Key : HKEY_LOCAL_MACHINE\SOFTWARE\Advantys\aspSmartUpload
Value : MaxFileSize
Return Value
Returns a Long value.
Example
<%
MyUpLoad.MaxFileSize = 100000
Response.Write("MaxFileSize=" & MyUpLoad.MaxFileSize &
"<br>")
%> |
AllowedFilesList
The AllowedFilesList property contains the list of file's
extensions which are allowed to be uploaded. If this list is empty then all files are
allowed. If the list is not empty then only the files with a specified extension are
allowed. In order to allow the files without extension list must contain two commas
",,". By default this property is empty. If there is a key in the Registry
corresponding to this property, then it keeps the string value of this key.
Syntax
.AllowedFilesList
Registry
Key : HKEY_LOCAL_MACHINE\SOFTWARE\Advantys\aspSmartUpload
Value : AllowedFilesList
Return Value
Returns a String value.
Example
<%
MyUpLoad.AllowedFilesList = "txt,doc,xls"
Response.Write("Files allowed=" & MyUpLoad.AllowedFilesList
& "<br>")
%> |
DeniedFilesList
The DeniedFilesList property contains the list of file's
extensions which are denied to be uploaded. If this list is empty then no files are
denied. All the files with an extension in the DeniedFileslist are denied even if they are
in the AllowedFilesList. In order to deny the files without an extension the list must
contain two commas ",,". By default this property is empty. If there is a key in
the Registry corresponding to this property, then it keeps the string value of this key.
Syntax
.DeniedFilesList
Registry
Key : HKEY_LOCAL_MACHINE\SOFTWARE\Advantys\aspSmartUpload
Value : DeniedFilesList
Return Value
Returns a String value.
Example
<%
MyUpLoad.DeniedFilesList = "bat,exe,com,asp"
Response.Write("Files denied=" & MyUpLoad.DeniedFilesList
& "<br>")
%> |
DenyPhysicalPath
The DenyPhysicalPath property prevents to access a path
other that a virtual path of the Web Server. By default this property is false. If there is
a key in the Registry corresponding to this property, then it keeps the string value of
this key.
Syntax
.DenyPhysicalPath
Registry
Key : HKEY_LOCAL_MACHINE\SOFTWARE\Advantys\aspSmartUpload
Value : DenyPhysicalPath
Return Value
Returns a Boolean value.
Example
<%
MyUpLoad.DenyPhysicalPath = True
Response.Write("Physical Path=" & MyUpLoad.DenyPhysicalPath
& "<br>")
%> |
ContentDisposition
The ContentDisposition property contains the string of the
Content Disposition Hearders for the MIME Type.
Syntax
.ContentDiposition
Values
- "attachment;"
- "inline;" for MSIE 5 users
- ""
Example
<%
MyUpLoad.ContentDisposition = "inline;"
%> |
DownloadBlockSize
The DownloadBlockSize value is used to determine how much
data will be read from the data source at one time. This property is used in
following methods : FieldToFile, DownloadFile and DownloadField.
Syntax
.DownloadBlockSize
Example
<%
MyUpLoad.DownloadBlockSize = 4096
- ou -
MyUpLoad.DownloadBlockSize = 32768
%> |
TotalBytes
The TotalBytes property contains the Size in bytes of the
POST form.
Syntax
.TotalBytes
Return Value
Returns a Long value.
Example
<%
Response.Write("Bytes=" & MyUpLoad.TotalBytes &
"<br>")
%> |
BinaryData
The BinaryData property returns the Byte corresponding to
the table index containing the transmitted data.
Syntax
.BinaryData(lngIndex)
Return Value
Returns a byte value.
Parameter
lngIndex is an index of the byte's Array.
Example
<%
for i=0 to MyUpLoad.TotalBytes - 1
response.write( Chr(MyUpload.BinaryData(i)) )
next i
%> |
Upload
The Upload method.
Syntax
.Upload
Example
<%
Dim MyUpLoad
Set MyUpload = Server.CreateObject("AspSmartUpLoad.SmartUpLoad")
MyUpload.UpLoad
%> |
Save
The Save method saves all files in the disk.
Syntax
.Save( [DestinationPath] )
Return value
Returns a Long value which indicates how many files have been saved.
Parameter
DestinationPath is optional. If this parameter is not specified then all files will
be saved in the root directory of the web server.
Example
<%
Dim MyUpLoad
Dim lngNBFile
Set MyUpload = Server.CreateObject("AspSmartUpLoad.SmartUpLoad")
MyUpload.Upload
MyUpload.Save
Response.Write(lngNBFile & " files saved.")
%> |
DownloadFile
The DownloadFile method.
Syntax
.DownloadFile(SourceFile[, ContentType, NewFileName])
Parameter
SourceFile is the source file. The path can be a virtual or a physical path. If
there is only a file name, then this one have to be placed in the root directory of the
web server.
ContentType.
NewFileName indicates a new name in the "Save As" dialog box.
Example
<%
Dim MyUpLoad
Set MyUpload = Server.CreateObject("AspSmartUpLoad.SmartUpLoad")
MyUpload.DownloadFile "c:\temp\myFile.txt",
"application/x-zip-compressed", "NewFileName.txt"
%> |
DownloadField
The DownloadField method.
Syntax
.DownloadField(SourceField[, ContentType, NewFileName])
Parameter
SourceField is the record of a DataBase.
ContentType.
NewFileName indicates a new name in the "Save As" dialog box.
Example
<%
Dim MyUpLoad
Set MyUpload = Server.CreateObject("AspSmartUpLoad.SmartUpLoad")
MyUpload.DownLoadFied "myRecordSet("FILE")",
"application/x-zip-compressed", "NewFileName.txt"
%> |
FieldToFile
The FieldToFile method writes file from a DataBase to a
specified directory. This method creates a new file.
Syntax
.FieldToFile FieldName(DestinationFile)
Parameter
DestinationFile is the file destination.
Example
<%
myUpload.FieldToFile "c:\temp\myFile.txt"
%> |
UploadInFile
The UploadInFile method creates a new file with all data of
the POST form.
Syntax
.UploadInFile (DestinationFile)
Parameter
DestinationFile is the file destination.
Example
<%
myUpload.FieldToFile "c:\temp\myData.txt"
%> |
|