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.
Here’s how.
External Editors
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.
A PDF
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.
10 Comments
Hi Jeff. I’m not seeing anything in my Preferences \ External Editor list of available filetypes/mime types, and there’s no way to add them from that screen. I’m running SQL Developer 23.1.0.097 on Windows 11 Pro. It would save me a lot of time to be able use explorer.exe to view the zipped data stored as BLOBs.
Thanks!
Jamie
Sorry there’s no way to add additional mime types to that preferences page, you can only change/set the external editors for the existing ones.
Hi Jeff:
My external editor does not list anything. All I see is blank and there is no way to add /delete any editor.
Can you help?
Best Regards,
Srinivasan
What OS?
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?
Hi Jeff.
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.”
Best regards.
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.
Hi Jeff
Is it possible to submit a suggestion/request to add javascript as a mime type to the available mime types?
Regards,
Shaun