I am currently using Apex 4.2 to build an app that allows user to upload/download files. I am using the below table :
CREATE TABLE "BLOB_FILES_NEW"
( "ID" NUMBER,
"BLOB_CONTENT" BLOB,
"MIME_TYPE" VARCHAR2(255),
"FILENAME" VARCHAR2(255),
"LAST_UPDATED" DATE,
"CHARACTER_SET" VARCHAR2(128),
)
The ID is Primary key and I have trigger that generates it before insert to table. The file upload works but when I check the table with select * it says the MIME_TYPE is -
Also when I try to download the files since it is - the browser does not recognise the file type and I need to manually add file ext and open it after downloading the file.
What steps should I follow in order for APEX to insert the correct mimetype into my table and allow the right format to be downloaded as well.
Also I tried to add a constraint where users can only upload pdf files :
alter table "BLOB_FILES_NEW" add constraint
"MY_TABLE_CON" check ( "MIME_TYPE" = 'application/pdf')
However when I try upload file (pdf or other) I am getting this error : ORA-01691: unable to extend lob segment
Any advise and help on these two issues appreciated.
Thanks,
Swetha