Sitecore–update existing file based media to database storage

If you implement a separate server for Content Management Server (CM) and the Content Delivery Server (CD), it is advised that you disable the file based media storage so that CD can retrieve the image information.

The following code shows how to update the existing file based media to database storage, from it you could create a Sitecore app to make a handy tool to update your existing media files.