def update_file_data(self, item: Content, new_filename: str, new_mimetype: str, new_file_content) -> Content: item.owner = self._user item.file_name = new_filename item.file_mimetype = new_mimetype item.file_content = new_file_content item.revision_type = ActionDescription.REVISION return item
def update_file_data(self, item: Content, new_filename: str, new_mimetype: str, new_content: bytes) -> Content: item.owner = self._user item.file_name = new_filename item.file_mimetype = new_mimetype item.depot_file = FileIntent( new_content, new_filename, new_mimetype, ) item.revision_type = ActionDescription.REVISION return item