1

Topic: Images stored in a mySQL database

This may seem like an insane thing to even consider, but has anyone ever thought of using the ImageManager to access images stored in a mySQL database? It would be extremely useful to me if it could be done.

I'm thinking that it might be possible to write a plugin that intercepts the directory access and, instead, just pulls images from the database and passes them back to the ImageManager for the normal display/insert dialog.

Is this even possible and, if so, would it be insane to attempt it? I'm willing to try it, but I just need some guidance about where to start or a "You're crazy!" response so that I don't waste my time.

Thanks

2

Re: Images stored in a mySQL database

Why do you think storing the image data in a DB is a wise thing to do? I only know of systems where the meta data gets stored in the DB (along with the image's file name) but the actual image data gets stored as a regular file in the file system.

Greetings from Germany,

Felix Riesterer.
(-> about me and this forum <-)

3

Re: Images stored in a mySQL database

Well, I've seen a number of applications where this is done, for a variety of reasons. We could debate the pros and cons, but that's for another day.

But putting that aside, I'm just asking the members of this forum if they think an interface between TinyMCE and mySQL is doable, and if so, just a basic idea of how to do it.

4

Re: Images stored in a mySQL database

The upcoming version will be more abstract so files can be stored in DB or AmazonS3 for example.

Best regards,
Spocke - Main developer of TinyMCE

5

Re: Images stored in a mySQL database

Will the next version be shipped anytime soon? I am thinking of developing a db backend as a plugin (php), but if version 4 is coming anytime soon i'd rather wait for that. Any hope for next version this fall, or should I just start coding against the current one?

6

Re: Images stored in a mySQL database

The PHP version is currently in Alpha/Beta stage, not sure how long it will be there though, we are already late with release, but I can't promise any date really. We want to make the next version really solid from start, that's what our customers expect, and since current available version works rather well we aren't really rushing it out.

Afraithe
TinyMCE Developer
Moxiecode Systems

7

Re: Images stored in a mySQL database

Option to store images in a DB would be useful. Just a simple case: on appharbor (.net hosting) web.app's directory being wiped on every deploy.

8

Re: Images stored in a mySQL database

Yes, and its being worked on for next major release, but currently, we do not have any official support for it.

Afraithe
TinyMCE Developer
Moxiecode Systems

9

Re: Images stored in a mySQL database

Just to add that this will be useful also to use for example MongoDB's GridFS, which has some advantages over the filesystem approach if you want to automatically replicate/shard the image collection. Hopefully it will be possible to start from the php S3 implementation and extend it via a plugin or something.