adapter API used to replace original file stroage to db storage.