ASPSMARTUPLOAD : DOCUMENTATION |
File
Object Last modified: August 1st, 1999 © 2002 Advantys. All rights reserved. |
The Name property contains the value of the attribute NAME of the <INPUT TYPE='file'> Tag.
Syntax
.NameReturn Value
Returns a String value.Example
<%
Response.Write("Name=" & MyUpLoad.Files.Item(2).Name)
%>
The FileName property contains the name of the file.
Syntax
.FileNameReturn Value
Returns a String value.Example
<%
Response.Write("FileName=" & MyUpLoad.Files.Item(2).FileName)
%>
The FileExt property contains the extension of the file.
Syntax
.FileExtReturn Value
Returns a String value.Example
<%
Response.Write("Extension=" & MyUpLoad.Files.Item(2).FileExt)
%>
The FilePathName property contains the full path of the file.
Syntax
.FilePathNameReturn Value
Returns a String value.Example
<%
Response.Write("Path=" & MyUpLoad.Files.Item(2).FilePathName)
%>
The ContentType property contains the Content-Type of field Data.
Syntax
.ContentTypeReturn Value
Returns a String value.Example
<%
Content-Type
Response.Write("=" & MyUpLoad.Files.Item(2).ContentType)
%>
The ContentDisp property contains the content-disposition of field Data.
Syntax
.ContentDispReturn Value
Returns a String value.Example
<%
Content-disposition
Response.Write("=" & MyUpLoad.Files.Item(2).ContentDisp)
%>
The Size property contains the file's size.
Syntax
.SizeReturn Value
Returns a Long value.Example
<%
Size
Response.Write("=" & MyUpLoad.Files.Item(2).Size)
%>
The ContentString property contains contents of the file.
Syntax
.ContentStringReturn Value
Returns a String value.Example
<%
Response.Write("Contents=" & MyUpLoad.Files.Item(2).ContentString)
%>
The TypeMIME property contains the Type of the file (application, audio, image,multipart, text, video, ... ).
Syntax
.TypeMIMEReturn Value
Returns a String value.Example
<%
MIME
Response.Write("Type=" & MyUpLoad.Files.Item(2).TypeMIME)
%>
The SubTypeMIME property contains the sub-Type of the file.
Syntax
.SubTypeMIMEReturn Value
Returns a String value.Example
<%
Response.Write("MIME Sub-Type=" & MyUpLoad.Files.Item(2).SubTypeMIME)
%>
The IsMissing property returns a boolean which indicates if user has not specified a file.
Syntax
.IsMissingReturn Value
Returns a Boolean value.Example
<%
If MyUpLoad.Files.Item(2).IsMissing Then
Response.Write("There is no specified file.")
End If
%>
The BinaryData property contains 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.Files.Item(2).size - 1
Response.Write( Chr( MyUpLoad.Files.Item(2).BinaryData(MyIndex) ) )
next i
%>
The SaveAs method saves file in the specified directory. This method always overwrites existing files.
Syntax
.SaveAs (FilePathName)Parameter
FilePathName is the destination directory with the file's name. It could be a physical or a virtual path. If there is only the file's name then this one will be saved on the root directory of the web server.Examples
<%
myUpload.files.item(2).saveas "c:\temp\" & myUpload.files.item(2).filename
myUpload.files.item(3).saveas "/docs/" & myUpload.files.item(3).filename
myUpload.files.item(4).saveas "myFile.txt"
%>
The FileToField method saves file in a record af a specified DataBase.
Syntax
.FileToField FieldNameParameter
FieldName is the field of the RecordSet.Example
<%
myUpload.files.item(2).FileToField myRecordSet.Field("FILE")
%>
© 2002 Advantys. All rights reserved.