AttachedFile

Overview

AttachedFile is a class in Aspose.Note for Python. Inherits from: Node.

AttachedFile exposes FileName, Bytes, and Tags properties to retrieve the attached file’s name, binary content, and any associated NoteTag objects.

AttachedFile represents a file attachment embedded in a OneNote page. It provides Bytes (the raw file content), FileName (the original filename), and Extension (the file extension). Enumerate attached files with document.GetChildNodes(AttachedFile) and write the Bytes content to disk to extract all attachments in one pass.

Properties

NameTypeAccessDescription
FileNamestr | NoneReadHolds the optional name of the attached file
BytesbytesReadContains the raw binary data of the attached file
Tagslist[NoteTag]ReadIs a list of NoteTag objects applied to the attached file

Methods

SignatureDescription
__init__(FileName: str | None, Bytes: bytes, Tags: list[NoteTag] | None)