def updateServerFile(filename, _base64_content): """ Client side function for the updateServer api. """ data = Data() data.cmd = "updateServerFile" data.filename = filename data._base64_content = _base64_content api = API(data) fd = api.send() result = fd.read() fd.close() return result
def updateFile(filename, _base64_content): ''' Update files to the server. The file to be stored into config.files_d. ''' data = Data() data.cmd = "updateFile" data.filename = filename data._base64_content = _base64_content # The server api will not replace the file. Returns False when The # file is exists in the server. api = API(data) fd = api.send() result = fd.read() return result