Rajani Parth
Posts: 0
Joined: Fri Nov 14, 2014 1:35 pm

Image is currepted using SendGrid API

Hello,

i used sendGrid api for sending mail
but i want also send image attchment from Appery database
i refere this document : http://blog.bismallion.com/sending-em...
here in mail i get attachment but it's currepted
iin my appery databse image is stored as a binary formate and i completed follow above link yet why my image is courepted.??

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Image is currepted using SendGrid API

Hello Rajani,

Could you please clarify did you try to send only an image or other files got broken too?

Rajani Parth
Posts: 0
Joined: Fri Nov 14, 2014 1:35 pm

Image is currepted using SendGrid API

Here in mail some text description and in attachment theres is images only currepred

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Image is currepted using SendGrid API

Rajani,

Please detail, what is the file extension of the image?

Rajani Parth
Posts: 0
Joined: Fri Nov 14, 2014 1:35 pm

Image is currepted using SendGrid API

var content = 'here is binary image data';
// Read file content first
var blob = new Blob([content], { type: "image/jpeg"});

var fileName = 'ZZZ.jpeg'
// Read file name first
formData.append("files[" + fileName + "]", blob);

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Image is currepted using SendGrid API

Hello,

You haven't read the image file itself.
1) Read the file first
2) Save received data to content variable
3) Use content variable to send it with custom service implementation

Return to “Issues”