Hi,
I am using a table having a BLOB column used to store a pdf document. The table was created in Oracle Apex. When I create a form on APEX, I can upload files and download, insomuch as Apex provided automatically una URL to download the file. Now if I query the data base from the command line,I gives the text "[unsupported data type]" in the BLOB column space.
In my case I will not use a form, but an JSPX page for upload files. but the table to store the file it is create in APEX. I am using a java class to download the file. However I can not recover the file, blob column sends the following message [unsupported data type]. I using the sentencia PL/SQL (dbms_lob.getlength), bu this is retreiving the length the file. How can I do to retrieve the object and not the length from database?, if the blob column sends the following message [unsupported data type]. Is there a way to recover a file storing in a table Apex from JSPX page?.
public void downloadBlobFile(FacesContext facesContext, OutputStream outputStream)
{
Row row = getSolicitudRow("XxerComunicadosView1Iterator");
BlobDomain blob = (BlobDomain) row.getAttribute("Archivo");
try
{
// copy the data from the blobDomain to the output stream
IOUtils.copy(blob.getInputStream(), outputStream);
blob.closeInputStream();
outputStream.flush();
}
catch (IOException e)
{
// handle errors
e.printStackTrace();
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), "");
FacesContext.getCurrentInstance().addMessage(null, msg);
}
}