We already know how easy it is to view images and plain text with the BLOB editor, yes?
But what if I have in my column a bunch of PDFs stored? I want to see that stuff without having to save the file, finding it, and then opening it.
Why can’t I just automatically open it directly from the database?
Well, it seems you can.
Step 1: Make sure you have the file types and associated editors defined in the preferences.
Based on what’s going on in your OS, you’ll have several of these already defined. If not, it’s pretty simple to add them manually.
Now, assuming you’ve got some fun data loaded up, let’s try it out.
As you can see in the screenshot above, PDF is mapped to Adobe Reader.
I just happen to have a PDF loaded into a BLOB, let’s send it to the external editor.
Here’s it working in action (click on the image to see the animation):
Now if I were to edit said document and save it back to the database via the ‘Load’ mechanism, then we’ve come full circle.
if i have a blob containing an excel .xlsx file , sql*developer thinks its a .jar file.
if i set .jar files to open with excel , excel complains the filetype doesnt match the name of .jar but it will then open if you force it too.
is there anyway to make this nicer?
I have a couple of questions about this subject.
How can I add external editors in a “pretty simple” way? I suppose I can edit product-preferences.xml but I suspect that’s not the “pretty simple” way.
How SQL Developer match a BLOB field with a mime type if there is not a mime type column o file extension? In your example, the BLOB is opened as a PDF document, but nothing, except DESCRIPTION content gives a clue about that.
I have tried something similar with a binary file stored in a BLOB and SQL Developer shows an error about “Mime type not supported”:
“The Mime Type of selected object is currently not supported. Please see the complete list of supported Mime Type and extension in Tools->Preferences->External Editor panel.”
don’t edit the preferences.xml, use the preferences dialog to define the external editors for the different mime types
if there’s no match, there won’t be an external editor option
you can’t add mime types, you can only supply editors for the mime types shown in the preferences dialog
Does somebody know, if with 4.2. you still cannot add mime types for external editors?
We haven’t made any changes there.