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!

Possible to download file using ajax on demand process?

Simon CollinsAug 2 2010 — edited Aug 5 2010
In the past I've used procedures with the wpg_docload.download_file function to download files by granting public to the procedure and executing the download from a report link (such as http://localhost:8080/apex/schema_name.download_blob?file_in=xxx)

I'd like to move to the download to a link that's called from an ajax called on demand process. Is this possible? I have got the report link calling a javascript function passing the rowid in and running the same download_blob procedure via the on demand process but, whilst the code runs OK it does not return the prompt box for the user to open/save the file. I guess this might be because it's not returning it to the javascript in the proper way but I'm v flaky wrt to ajax.

var ajaxRequest = new htmldb_Get( null , &APP_ID. , 'APPLICATION_PROCESS=download_blob' , 0);
var ajaxResult = ajaxRequest.get();

Thanks

Simon
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 2 2010
Added on Aug 2 2010
2 comments
1,836 views