Attachments download

Moderator: crythias

Locked
cesco_78
Znuny newbie
Posts: 13
Joined: 20 Mar 2012, 12:40
Znuny Version: 03011

Attachments download

Post by cesco_78 »

Hello,
I've a question...

I need to extract data from the OTRS DB (MySQL) in Microsoft Office, I created an ODBC connection and I can extract all data I need exept the attachments. There is a way to have a link to the file directly from Excel or Access?

thank You

Regards
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Attachments download

Post by crythias »

be default, it's a binary blob in the database.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
cesco_78
Znuny newbie
Posts: 13
Joined: 20 Mar 2012, 12:40
Znuny Version: 03011

Re: Attachments download

Post by cesco_78 »

But there isa a way to download and convert it in a PDF like i can do in OTRS web interface?

Thanks!
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Attachments download

Post by crythias »

No.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Attachments download

Post by jojo »

if you write some code which will convert the base64 coded data into binary yes (you need some developers for this!)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
cesco_78
Znuny newbie
Posts: 13
Joined: 20 Mar 2012, 12:40
Znuny Version: 03011

Re: Attachments download

Post by cesco_78 »

But there is not an "user-exit" or an api to ask to OTRS the attachment?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Attachments download

Post by jojo »

there is a webservice for reading tickets
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
cesco_78
Znuny newbie
Posts: 13
Joined: 20 Mar 2012, 12:40
Znuny Version: 03011

Re: Attachments download

Post by cesco_78 »

Where i can find it, please?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Attachments download

Post by jojo »

read the developer docu on docs.otrs.org
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Attachments download

Post by crythias »

http://dev.otrs.org/
http://dev.otrs.org/3.1/Kernel/System/T ... ticle.html

Code: Select all

ArticleAttachment()
get article attachment (Content, ContentType, Filename and optional ContentID, ContentAlternative)
    my %Attachment = $TicketObject->ArticleAttachment(
        ArticleID => 123,
        FileID    => 1,   # as returned by ArticleAttachmentIndex
        UserID    => 123,
    );
returns:

    my %Attachment = (
        Content            => "xxxx",     # actual attachment contents
        ContentAlternative => "",
        ContentID          => "",
        ContentType        => "application/pdf",
        Filename           => "StdAttachment-Test1.pdf",
        Filesize           => "4.6 KBytes",
        FilesizeRaw        => 4722,
    );
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked