If you feel some confusion about any thing or if you do not find what you are looking for, please inform us so that we can improve our documentation accordingly. docs@aspfusion.net |
![]() |
Complete basic file management operations, such as Append, Copy, Delete, Move, Read, Rename and Write a file.
Along with these basic operations, it provides Upload and UploadAs facility. Upload operation allows uploading single or multiple files at a time form client browser to the server. It also allows resolving the problem of name conflicting through the property NameConflict, its values are Error (default), Skip, OverWrite and MakeUnique. UploadAs operation allows uploading single or multiple files at a time form client browser to the server with specified name. Only few lines of code is all to provide browser based File Upload on your server.
It also provides Download and DownloadAs. Download operation allows downloading file to client browser with actual file name and DownloadAs operation allows downloading file to client browser with specified name.
<%set
Obj = Server.CreateObject("AdvFile.File")%>
Property |
Description |
AddNewLine |
If
this property is set to TRUE, a new line character is appended to the text that is written to the file. If this attribute is set to FALSE, no new
line character is appended to the text.
Valid values are |
Attributes |
A
comma-delimited
list of file attributes to be set on the file being processed. Valid
values are |
Count |
Return
number of files to be uploaded |
DeleteFile |
If
this property is TRUE then file is deleted from server after downloading.
Valid values are |
DownloadForceFully |
If
this property is TRUE then file is downloaded forcefully. Valid values are |
ErrorReason |
Reports
any errors that occur during the request |
Form |
Return
form fields values |
IsDefined |
Check
whether a form field exists or not. Return 1 if it exist otherwise 0 |
IsError |
Returns
1 if any error occur during the request otherwise 0 |
NameConflict |
Determines
how the file should be handled if its name conflicts with the name of a
file that already exists in the directory. Valid values are |
SetMaxFileSize |
Specified
the maximum allowed size of the file to be uploaded in bytes |
Truncate |
If
this property is set to TRUE and size of the file being uploaded exceed
the maximum file size, then file is truncated to maximum file size
mentioned. If it is FALSE then file is not uploaded if file size exceed
the limit.
Valid values are |
Type |
This
property is used to set content type for the file to be downloaded.
Default value is application/octet-stream. |
Method |
Parameter |
Return Value |
Description |
Append |
Source |
None |
Append
the source file with data given |
Copy |
Source |
None |
Copy
the given source file to destination |
Delete |
Source |
None |
Delete
the given source file |
Download |
Source |
None |
Download
the source file to client’s browser |
DownloadAs |
Source |
None |
Download
the source file with given name to client’s browser |
Move |
Source |
None |
Move
the given source file to destination |
Read |
Source |
Object |
Read
the given source file |
Rename |
Source |
None |
Rename
the given source file to destination |
Upload |
SaveTo |
Array
of objects |
Upload
all files to the given path |
UploadAs |
SaveTo |
Array of objects |
Upload
files to the given path with given filename |
Write |
Source |
None |
Write
the source file with data given |
Copyright © 2000, Advanced Communications |