[mir-coders] QUESTION: How to check the multimedia resources stored in a mir installation's database?
txopi at sindominio.net
Mon Sep 6 14:38:53 PDT 2010
> On 09/05/2010 06:06 PM, Txopi wrote:
>> 3) Create a little program in Java or other programming language
>> that takes the multimedia resource directly from the postgresql
>> database an creates a file that I can check. [...]
> in Postgres (at least in version 7.4) you can extract blob data with
> psql like this:
> SELECT lo_export(image_data, '/tmp/image.jpg')
> FROM images
> WHERE id = 172630;
> A while ago I've written a small piece of Java code (attached) to
> extract all images from the DB. It might not work if you aren't using
> Postgres 7 because it seems to me like a lot changed in the way blobs
> are stored/accessed. But maybe you can adapt it to your needs.
> I think images are the only media files that are stored in the database
> by default. It depends on which MediaHandler is used.
> (For de.indymedia.org we switched to MediaHandlerImagesExternScaling to
> get the images out of the database because the DB dumps have gotten
> extremely large [> 10 GB] and difficult to manage.)
Thank you very much for your answer and for the information you gived
me. I have been exploring MIR's database and i haven't found a place
were the multimedia resources can be stored.
"image_data" column of the "images" table is of type oid:
image_data | oid |
But the tables "audio", "video" and "other media" don't have any oid
column. So i understand now that only the images are stored in the
database. Audio, video and other resources are stored in the filesystem.
If this is right, the check of the multimedia resources i was planning
to do can't be done because the information isn't in the database.
Can someone confirm that the binary data stored in a mir's database is
just from the images, never from other multimedia resources?
Can someone explain to me how can be determined the type of MediaHandler
that a mir installation is using?
More information about the mir-coders