Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE
- PACKAGE FILE_API AS
- /* TODO enter package declarations (types, exceptions, methods etc) here */
- /* small subset of possible functionality for now, no exceptions etc) */
- /* file_upload function, returns id of newly uploaded file */
- FUNCTION file_upload (
- p_name VARCHAR2, /* IN name of the file e.g. myResume.pdf */
- p_upload_time DATE, /* IN upload time of the file */
- p_content_type VARCHAR2, /* IN content type e.g. application/pdf */
- p_data BLOB, /* IN binary data of file */
- p_data_size INTEGER) /* IN size of file in bytes */
- RETURN INTEGER; /* IN returns id of the uploaded file */
- /* file_download function takes in ID and sets output parameters */
- PROCEDURE file_download (
- p_id INTEGER, /* IN id of the file to download */
- p_name VARCHAR2, /* OUT name of the file e.g. myResume.pdf */
- p_upload_time DATE, /* OUT upload time of file */
- p_content_type VARCHAR2, /* OUT content type of file e.g. application/pdf */
- p_data BLOB, /* OUT binary data of file */
- p_data_size INTEGER /* OUT size of file in bytes */
- );
- /* exceptions... file does not exist exception etc. */
- END FILES_API;
- /
Add Comment
Please, Sign In to add comment