The CMS I've developed stores the images and for that matter all other forms of media in the DB as a BLOB, before anyone turns this into a debate over DB vs. FS, leave it alone, I have my reasons
Is there a way or even a workaround to allow FCK's file browser to be provided with images from my media store in the database rather than browsing a physical folder? On the same token, is there a way for FCK to call a remote procedure of some kind rather than invoke it's own uploader when I want to upload a new file?
Many thanks,
Kevin.
Fri, 08/03/2007 - 21:03
#1
Re: What if images are stored as BLOB's in the DB???
Wel... you can create your custom functions that will respond to file browser requests.
You can find some helpful information on FCKeditor's wiki:
http://wiki.fckeditor.net/Developer's_G ... ntegration
Additionally, I' d suggest using Firefox along with Firebug and Live HTTP headers to debug requests easily.
In editor\filemanager\connectors\php\ you will find some that are responsible for creating XML response.
You will have to edit commands.php and some of these functions to your needs.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: What if images are stored as BLOB's in the DB???
Re: What if images are stored as BLOB's in the DB???
i'm looking for a solution to be able to upload files to a mysql db but don't know where to begin with fck's filemanager
Re: What if images are stored as BLOB's in the DB???
Re: What if images are stored as BLOB's in the DB???
A.M., been a while since I originally posted this and funny enough I've just begun work on it, fell to the middle of the To-Do list, and I finally have no more excuses... have to get it done
The files that need to be worked on are in \fckeditor\editor\filemanager\connectors\php\. I was thinking of simply altering the commands.php which contains the functions (GetFolders, GetFoldersAndFiles, CreateFolder and FileUpload) that you're talking about and allowing these functions to mimic the existence of a real file system. We've already got a tableset in our CMS for handling a hierarchy of virtual folders, but as far as connecting this to that, I'll be trying to re-design these functions to simply provide an object with the necessary values so that no matter how I or anyone else designs their own internal system, they can take the object and deal with it however they want, run any other functions that would normally be triggered by an upload, etc. We're on MySQL but there's no reason that this can be compatible with ALL DB's out there if it's an object that's passed rather than individual plugin's for each DB. I think I'm also going to have to look a little closer at io.php, it may or may not be affected by the changes as well.
Any comments... thoughts... I haven't had a lot of time to put into this yet, but I'll be diving in shortly.
Kevin.
Re: What if images are stored as BLOB's in the DB???
FCKConfig.LinkBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Connector=/my-file-manager.php
, where /my-file-manager.php can be any path you want. This way you won't depend on FCK's hierarchy and can upgrade to the new version without having to worry about wiping any of your changes.
Also change quick upload URLs like this:
FCKConfig.LinkUploadURL = "/my-quick-upload.php";
The former will receive all of the commands (GetFolders, CreateFolder, etc) and the latter will just get a file form post.
Andre
Re: What if images are stored as BLOB's in the DB???
Thanks!
Re: What if images are stored as BLOB's in the DB???
i noticed there a lot of people who wish to know how this is done, i have created a project to get us started

http://www.codeplex.com/fckeditfilemanager
please have a look and provide some input, it has bugs here and there, but should be fixed with more people driving the project
Re: What if images are stored as BLOB's in the DB???
Hey, decided it was about time I checked in, I've got a couple clients looking for this feature again so I'm starting to look seriously at it again and just wanted to see if anyone made any progress on this, any words of wisdom to share
I'll post my progress.