Uploading and downloading files
Sometimes it is very handy to be able to upload and download files in a web application. For example, an intranet site where users can upload their own images, or a product catalog with images of the products. We will create a web page where users can upload and download important documents such as templates of letters, fax sheets, telephone directories, and so on.
Getting ready
Make sure you have access to the APP_DOCUMENTS
table. Also make sure the directory parameter in the call to bfilename
points to an existing directory and that at least read access is granted. To create a directory with read access, execute the following commands (under the sys or system user) in sqlplus:
Create directory <<directory>> as 'c:\documents'; Grant read on directory <<directory>> to <<user>>; [9672_03_17.txt]
Where <<directory>>
is the name of the directory you want to create in the database. This is a virtual directory and you...