def files(self, payload):
url = "<STR_LIT>".format(url_base=self.hs.url_base,<EOL>pid=self.pid)<EOL>encoder = MultipartEncoder({<EOL>"<STR_LIT:file>": (payload['<STR_LIT:file>'], open(payload['<STR_LIT:file>'], '<STR_LIT:r>')),<EOL>"<STR_LIT>": payload['<STR_LIT>']<EOL>})<EOL>monitor = MultipartEncoderMonitor(encoder, default_progress_callback)<EOL>r = self.hs._request('<STR_LIT:POST>', url, None, data=monitor, headers={'<STR_LIT:Content-Type>': monitor.content_type})<EOL>return r.text<EOL>
Upload a file to a hydroshare resource.

        :param payload:
            file: File object to upload to server
            folder: folder path to upload the file to
        :return: json object
            resource_id: string resource id,
            file_name: string name of file