Implement /api/file GET/PUT method

This change implements the the /api/file GET/PUT method and tested with the AJAX GUI. I will add unit test later for the new APIs.