Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

BLOB files MIME_TYPE and Apex 4.2

Swethashree_CSM-OracleNov 27 2013 — edited Nov 29 2013

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 27 2013
Added on Nov 27 2013
10 comments
1,746 views