Skip navigation elements to page contents
Wersja polskaEnglish version
Author
Jakub Pawlowski
OTN Forum nick:
KUBA
Related blogs
Steve Muench
Duncan Mills
Frank Nimphius (Old)
Grant Ronald
Shay Shmeltzer
Ric Smith
Didier Laurent
JHeadstart Team
AMIS
Chris Schalk
IT-Eye
LogicaCMG
DominionSpy
Andrejus Baranovskis
Gerger Consulting
Shay Van Keirsbilck
Radovan Kobularcik
Frank Nimphius (New)
John Stegeman
Branislav Nemec
Matthias Wessendorf
Chris Muir
Matthew Wilson


Upload and download files from ADF into blob type colum.


From time to time on OTN Forum appears problem how to upload any file to Oracle database, and then download it from ADF Faces application.  Because I also met this problem, bellow present it's solution. Example uses popup window to uploading, but it can be created on separate page.

 

app

 

To run example you must create in any schema table, sequence and trigger (all contained in create.sql script). Look into MimeTypes class. It conatins getMimeType() method that gets file extension and return suitable mime type.

 

mime

 

Some people on OTN Forum get exceptions because they tried to make operations on files not supported by this method Laughing

Download example (JDeveloper 10.1.3.2). Before running copy from JDeveloper to public_html /WEB_INF/lib libraries: adf-faces-impl.jar i jsf-impl.jar.



Created:    16/05/2007

Copyright 2007