Kernel::System::DynamicFieldLegacy::Driver::Attachment

NAME

Kernel::System::DynamicFieldLegacy::Driver::Attachment

DESCRIPTION

DynamicFields Attachment Driver delegate

PUBLIC INTERFACE

This module implements the public interface of Kernel::System::DynamicFieldLegacy::Backend. Please look there for a detailed reference of the functions.

new()

usually, you want to create an instance of this by using Kernel::System::DynamicFieldLegacy::Backend->new();

ValueGet()

returns a hash holding the file as well as it's info

    my $Attachment = $DynamicFieldDriver->ValueGet(
        DynamicFieldConfig     => \%DynamicFieldConfig,
        ObjectID               => $ObjectID,            # TicketID or ArticleID
        Download               => 0,                    # or 1, optional, returns file + info if 1
        Filename               => 'StarryNight.jpg',    # Required if Download == 1
    );

AttachmentDownload()

This function is used to get the output headers for the download

    my $Value = $BackendObject->AttachmentDownload(
        ObjectID           => $DynamicFieldObjectID,
        Object             => $DynamicFieldObject,  # Ticket or Article
        DynamicFieldID     => $DynamicFieldID,
        Filename           => $AttachmentFileName,
        DynamicFieldConfig => $DynamicFieldConfig,  # complete config of the DynamicField
        TicketObject       => $TicketObject,
        LayoutObject       => $LayoutObject,
    );

    Returns $Attachment;
Scroll to Top