'Upload a file given its content.  Returns event_uuid.'

def file_from_content(self, content, storage_name, parent_uuid=None, **params):

    try:
        storage_name = (storage_name or ('%s.txt' % uuid()))
        full_path = ((self.basefilename() + '.') + storage_name)
        with open(full_path, 'wb') as f:
            f.write(content.encode('utf-8'))
    except:
        self.notify_of_error(('Could    not    write    file    ' + full_path))
    else:
        return self('remote    file', parent_uuid, file_origin_name=storage_name, file_origin_path=None, file_origin_created=datetime.utcfromtimestamp(os.path.getctime(full_path)).isoformat('    '), **params)
    return None
