Hello, community
I have used the following code for the jpg image attachment.
Attachment => [
"{""ContentType"":""image/jpg"",""Filename"":""image,jpg"",""Content"":""R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==""}"
]
Code is working fine, It is attaching the file to the ticket but it is unable to see the image after downloading.
I have also tried with the following code but it doesn't visible the image
Attachment => [
{
Filename => "testfile.jpg",
Content => ${$JPGContent},
ContentType => "image/jpg",
}
Hope you will help me to come out from the issue.
Best Regards,
Vrushali
How to attach jpg image which creating ticket
-
- Znuny newbie
- Posts: 3
- Joined: 07 May 2021, 08:45
- Znuny Version: OTRS 6
- Real Name: Vrushali Gave
-
- Znuny superhero
- Posts: 890
- Joined: 15 Dec 2016, 15:13
- Znuny Version: All
- Real Name: Emin
- Company: Efflux GmbH
- Contact:
Re: How to attach jpg image which creating ticket
Hello Vrushali,
Not quite sure what you're trying to do, but are you aware of template attachments?
Docs
Best regards
Emin
Not quite sure what you're trying to do, but are you aware of template attachments?
Docs
Best regards
Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/
Free and premium add-ons: German | English
Free and premium add-ons: German | English
-
- Znuny newbie
- Posts: 3
- Joined: 07 May 2021, 08:45
- Znuny Version: OTRS 6
- Real Name: Vrushali Gave
Re: How to attach jpg image which creating ticket
@Emin
I'm raising the OTRS ticket through the API calls. The code I have mentioned is for the OTRS attachment. Using that code I'm unable to see the image after downloading an attachment.
I'm looking forward to solving this error ASAP
I'm raising the OTRS ticket through the API calls. The code I have mentioned is for the OTRS attachment. Using that code I'm unable to see the image after downloading an attachment.
I'm looking forward to solving this error ASAP
Re: How to attach jpg image which creating ticket
the base64 you posted is a gif file with only some bytes....
"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
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Znuny superhero
- Posts: 890
- Joined: 15 Dec 2016, 15:13
- Znuny Version: All
- Real Name: Emin
- Company: Efflux GmbH
- Contact:
Re: How to attach jpg image which creating ticket
A free forum is a bad place for ASAP help. You might consider professional support if it's urgent.
First, your ContentType is wrong. It should be 'image/jpeg'. Also, as jojo mentioned, the content should match the content type.
— Emin
First, your ContentType is wrong. It should be 'image/jpeg'. Also, as jojo mentioned, the content should match the content type.
— Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/
Free and premium add-ons: German | English
Free and premium add-ons: German | English
-
- Administrator
- Posts: 3983
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: How to attach jpg image which creating ticket
Hi,
Check the marketplace for ASAP solutions, this forum is run by volunteers in their spare time without any financial compensation.
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
-
- Znuny newbie
- Posts: 3
- Joined: 07 May 2021, 08:45
- Znuny Version: OTRS 6
- Real Name: Vrushali Gave
Re: How to attach jpg image which creating ticket
Hello,
Could you please help me to get the content? How will get the image content?
If I use this code then what will be the Content for a jpeg file?
"{""ContentType"":""image/jpeg"",""Filename"":""file.jpeg"",""Content"":"" ? ""}"
-
- Znuny superhero
- Posts: 890
- Joined: 15 Dec 2016, 15:13
- Znuny Version: All
- Real Name: Emin
- Company: Efflux GmbH
- Contact:
Re: How to attach jpg image which creating ticket
Hey,
You're asking the wrong question. You should first have the content and the filename and then ask for the content type, but I can't tell you how to get the image content. I don't even know what exactly you're trying to do with your extension/application. There will/should be a place where the user uploads a file and in that way, you'll get the content of the image. You simply put the filename into a (most likely core) function that'll tell you the content type of the file.
If it's an OTRS extension, you can take a look at AgentTicketPhone.pm and how that module handles uploading files. If it's a third-party application, you'll have to search the internet on how to upload files in that programming language and how to extract the content type of a file.
— Emin
You're asking the wrong question. You should first have the content and the filename and then ask for the content type, but I can't tell you how to get the image content. I don't even know what exactly you're trying to do with your extension/application. There will/should be a place where the user uploads a file and in that way, you'll get the content of the image. You simply put the filename into a (most likely core) function that'll tell you the content type of the file.
If it's an OTRS extension, you can take a look at AgentTicketPhone.pm and how that module handles uploading files. If it's a third-party application, you'll have to search the internet on how to upload files in that programming language and how to extract the content type of a file.
— Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/
Free and premium add-ons: German | English
Free and premium add-ons: German | English