|
Re: Creating File Uploader [message #178090 is a reply to message #178063] |
Mon, 19 June 2006 06:31 |
Frank Naude
Messages: 4581 Registered: April 1998
|
Senior Member |
|
|
Create a new application and select option "Create from Spreadsheet".
"From a Spreadsheet:
Create an application based on spreadsheet data. Upload or paste spreadsheet data to create a table. The application will feature query, insert, update, and analysis capabilities on the newly created table."
|
|
|
|
|
|
Re: Creating File Uploader [message #178177 is a reply to message #178140] |
Mon, 19 June 2006 23:44 |
asurana
Messages: 5 Registered: June 2006
|
Junior Member |
|
|
For that you first create a column of BLOB type in table and store the file content in that column and then to display that you have to write the below procedure -
[Change accordingly]
CREATE OR REPLACE PROCEDURE download_my_file(p_file in number) AS
v_mime VARCHAR2(48);
v_length NUMBER;
v_file_name VARCHAR2(2000);
Lob_loc BLOB;
BEGIN
SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
INTO v_mime,lob_loc,v_file_name,v_length
FROM file_subjects
WHERE id = p_file;
--
-- set up HTTP header
--
-- use an NVL around the mime type and
-- if it is a null set it to application/octect
-- application/octect may launch a download window from windows
owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
-- set the size so the browser knows how much to download
htp.p('Content-length: ' || v_length);
-- the filename will be used by the browser if the users does a save as
htp.p('Content-Disposition: attachment; filename="'||substr(v_file_name,instr(v_file_name,'/')+1)|| '"');
-- close the headers
owa_util.http_header_close;
-- download the BLOB
wpg_docload.download_file( Lob_loc );
end download_my_file;
/
|
|
|