AdvFile Example Code

The component provides you complete file management on server. While turning on the component for a new website, the system takes physical path, which is usually the web root of that website. All file management operations are restricted to the physical path mentioned in ASPFusion Administration. The component is very easy to use and it uses very low memory to upload a large file. The maximum size of file that can be uploaded through this component is space available at target server. There are no restrictions on size of the file to be uploaded. It provides following operations for server side file management.

  1. Complete basic file management operations such as Append, Copy, Delete, Move, Read, Rename and Write a file.

  2. Along with these basic operations, it provides Upload and UploadAs facility. Upload operation allows uploading a 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.

  3. 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.

Method Name Method Description
Append Append the source file with data given
Copy Copy the given source file to destination
Delete Delete the given source file
Download Download the source file to client’s browser
DownloadAs Download the source file with given name to client’s browser
Move Move the given source file to destination
Read Read the given source file
Rename Rename the given source file to destination
Upload1     Upload2 Upload file(s) to the given path
UploadAs1     UploadAs2 Upload file(s) to the given path with given filename
Write Write the source file with data given

Back

Copyright © 2000, Advanced Communications