This content has been marked as final. Show 6 replies
If this is web architecture and mod_plsql based (Apache module for executing PL/SQL procedures via the web server's CGI) then easy.
A standard HTML file upload form. User selects file, submits form to web server and the file is uploaded (automatically) into that URL's (called a Database Access Descriptor) documents table in the Oracle database.
For downloading - PL/SQL code streams the LOB contents to the web browser using the WPG_DOCLOAD.download_file() call.
If you are referring to more traditional client-server, then the DBMS_LOB package is typically used by clients to read and write (in chunks) data to and from LOBs in the database.
Trung Hieu wrote:Make sure you don't give us too much information to describe what you want because we might then be able to propose a solution...
thank you,butt i meant,i want to write a function/procudure to download a file with parameters such as download_file('http://abc.com/file.rar')
Trung Hieu wrote:Use UTL_HTTP to make the HTTP connection to the web server. Issue a HTTP GET command for that URL. Read (binary mode) the response from UTL_HTTP and write append it to a BLOB using DBMS_LOB.
yes,my purpose is i want to write a procedure or function to download file from webserver such as download_file('http://abc.com/file.rar') but i don't know , how to do that ?
See Oracle® Database PL/SQL Packages and Types Reference for details (and sample programs) on UTL_HTTP and DBMS_LOB.