Attachments handling

Parameters for attachments handling

Parameter

Possible values

Default value

Where can be used

Description

with_attachments

True, False

False

The option to enable attached files extraction. If the option is False, all attached files will be ignored.

need_content_analysis

True, False

False

dedoc.DedocManager.parse()

The option to enable file’s attachments parsing along with the given file. The content of the parsed attachments will be represented as ParsedDocument. Use True value to enable this behaviour.

recursion_deep_attachments

integer value >= 0

10

dedoc.DedocManager.parse()

If the attached files of the given file contain some attachments, they can also be extracted. The level of this recursion can be set via this parameter.

return_base64

True, False

False

Attached files can be encoded in base64 and their contents will be saved instead of saving attached file on disk. The encoded contents will be saved in the attachment’s metadata in the base64_encode field. Use True value to enable this behaviour.

attachments_dir

optional string with a valid path

None

The path to the directory where document’s attached files can be saved. By default, attachments are saved into the directory where the given file is located.