Modify Resource classes and support file uploading