Home » Developer & Programmer » Forms » How to get BLOB file extension (forms 10G)
How to get BLOB file extension [message #462567] Fri, 25 June 2010 00:55 Go to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

There are different types of files loaded in databse BLOB type column, .doc, .xls, .pdf or even .xlsx and .docx. Now, I need to download these file and open it. The problem is how can I determine what file extension these files have.

Help needed from you guys.
Re: How to get BLOB file extension [message #462568 is a reply to message #462567] Fri, 25 June 2010 00:56 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Extensions are meaningless for Oracle.
Store in another column the associated application that you have to use to open it.

Regards
Michel
Re: How to get BLOB file extension [message #462570 is a reply to message #462568] Fri, 25 June 2010 00:58 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Thanks for your reply.

What do you mean by store associated application?
Re: How to get BLOB file extension [message #462577 is a reply to message #462570] Fri, 25 June 2010 01:32 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you want the extension this is because you want to know if it an Excel, PDF, Word... document, isn't it?
So store this name of the application in a column or store the extension, as you want.

Oracle can't know the extension, so you have to tell it.

Regards
Michel

[Updated on: Fri, 25 June 2010 01:33]

Report message to a moderator

Re: How to get BLOB file extension [message #462578 is a reply to message #462577] Fri, 25 June 2010 01:35 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Okay, thanks Michel.

I thought there was a way. But since ther's not, I'll have to do it that way.
Re: How to get BLOB file extension [message #462579 is a reply to message #462578] Fri, 25 June 2010 01:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
As some programs (like mail filters) are able to (sometimes) determine which type of file it is analyzing the binary I think it is (sometimes) possible but I bet it is a non trivial code.
(Maybe you could find something searching on the web.)

Regards
Michel
Re: How to get BLOB file extension [message #462590 is a reply to message #462579] Fri, 25 June 2010 02:59 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

I only encountered those binary filter on web programming. Well, if I got one for oracle I'll post it here.

Thanks again.
Re: How to get BLOB file extension [message #462591 is a reply to message #462590] Fri, 25 June 2010 03:09 Go to previous message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Thanks.
Michel
Previous Topic: first_record at deatil level
Next Topic: Parent child table update (EMP and DEPT) (merged)
Goto Forum:
  


Current Time: Fri Sep 20 00:26:23 CDT 2024