Reputation: 41
For my application, I wanted to implement the Upload and Download feature, so I have implemented the upload feature. The uploaded document (pdf) should be visible on the user's task details page. I have made a classic report to fetch the document.
I am using this query to display the data:
select
t1.req_id,
dbms_lob.substr(t2.attachment, 2000, 1) as attachment,
sys.dbms_lob.getlength(t2.attachment) as download
from
pack_details_upload t2, emp_sim_roaming t1
so I get three plain text columns and the data is shown like this:
But I want a download link for the file so I modified the Download column to the type ‘Download BLOB’ and filled in the required fields like this
but now it shows error:
Any way to correct this? Thanks
Upvotes: 0
Views: 144
Reputation: 41
Alright i figured out that the query I am also required to import file_id from t2. So it should be:
select
t1.req_id,
dbms_lob.substr(t2.attachment, 2000, 1) as attachment,
sys.dbms_lob.getlength(t2.attachment) as download,
t2.file_id
from
pack_details_upload t2, emp_sim_roaming t1
Upvotes: 0