refactor filestorage myresource in resource