Posted
on Feb 14, 2012
(permalink)
Hello Dobromir,
Thank you for replying.
For issue one, I want to use the FileExplorer to organize image files that are provided from a database. I have implemented a filehandler that takes an id and returns an image for that id. Eg. getimage.ashx?id=121 returns a picture of me in a hat.
The files are saved with filenames built from a guid and an extension, eg. f70218dd-4e37-43bf-aee2-ca012fb3042f.JPG. The id, the filename and the original filename, eg. paul.jpg (I didn't mention this last time, apologies) are stored to a table ("FILES"). The files are arranged in directories as shown below.
I can get the FileExplorer to display all this information using a Custom Provider based on the one provided in the Knowledge base.
As I mentioned, this setup means that our users can upload various "Paul.jpg"s without them overwriting each other and we can display them all in one folder if needs be. This means that the returned path "News/Paul.jpg" is not unique. What I think I need is some way of getting the underlying URL, "getimage.ashx?id=121", say, or a the fileItem with the Url in it or the id in it.
As the Directories should be unique I can write something like "private int getDirectoryIdFromPath(string Path)", and to move a file to a directory I have a function "bool moveFile(int FileId, int DirectoryId)" that updates the DB accordingly.
For issue 2 we are currently using dll 2010.2.826.35 I'll see if I can get it updated. By the way, the FileExplorer works as an editor dialog, but not in a page.
Thank you again,
Paul