Kernel::System::Ticket::Article::Backend::MIMEBase::Role::ProvidesArticleStorageUtils

NAME

Kernel::System::Ticket::Article::Backend::MIMEBase::Role::ProvidesArticleStorageUtils – provide utils for the ArticleStorageAmazonS3.

PUBLIC INTERFACE

GenerateObjectKey

Generate valid S3 object key (see https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines) by calculating the MD5 digest in hex format of the provided filename.

    my $Key = $BackendObject->GenerateObjectKey(
        ArticleID    => 42,
        Filename     => 'nice.jpeg',
        IsAttachment => 1,              # (optional)
    );

The key format matches following pattern \d+/(attachments/)?[a-f0-9]{32}).

Returns

    $Key = "2023/7/7/42/attachments/d45411ec82b26240720ab31fa986c795"; # IsAttachment true
    $Key = "2023/7/7/42/d45411ec82b26240720ab31fa986c795";             # IsAttachment false

DetermineDisposition

Determine disposition from retrieved article meta information.

has Upload

Generic upload method. If the configured 'MaxObjectSize' limit is exceeded a multi part upload is used to store the object key otherwise a 'simple' put is used.

MultipartUpload

Upload a single object as a set of parts.

Scroll to Top