I have started on this task and have done quite alot in the last couple hours of this large task. I have checked a couple changes (about 21 files changed)
Here is the plan of attack so far.
To start the task I looked at your existing provider model for XML & Db and started focussing on using the same concept in the file manager.
So the application uses the same providers either XML or DB, however you can specify a specific provider for File Management by adding the attribute "fileStoreProvider=<provder>" in the web.config you can use two providers. If this tag does not exist
then the default provider is used. You can look into the /Providers/BlogProivderSection.cs file for the additional attribute.
Now in the BlogProvider base class I have added quite a few abstract methods for file management. This (as you know) requires the inherited providers to implement these new methods. That being said I have created two classses (1 per provider) as seperate
files /Providers/DbFileSystemProvider.cs & /Provider/XmlProvider/XmlFileSystemProvider.cs.
Both these classes as you are aware act completly different. The db provder works with two tables (the sql setup script is in the /setup/SQLServer/MSSQLFileStoreTables2.5) and the xml provider basically works in the same method as you currently have implemented.
Now to follow your existing model I have added static methods to the BlogService class to work with the active provider. Again the fileSystemProvider is different than your regular provider object.
Now for File Management the FileSystem contains 3 basic classes with various methods an properties.
Directory : Handles directory management
File : Handles file management
Image : handles specific image management.
Additionally I made changes to both the Image & File handler to use the BlogService static methods for retriving files and sending down the HttpResponse. I also added two new re-write methods to help with browser caching; (according to Google) browsers
may not cache a file if it contains a query string. Now i am not 100% sure of this but I have allowed for two more rewrite rules such as
/images/2007/3/sample.jpg.jpgx -> evaluates to image.axd?picture=/2007/3/sample.jpx
/files/2007/3/file.txt.axdx -> evaluates to file.axd?file=2007/3/file.txt
Now there is a public property of file and image that give you the rewritten download link.
This has only really been tested in the primary blog, i will be working on sub blogs later this evening.