question

justin-nguyen11499 avatar image
justin-nguyen11499 asked ·

Send attachment in message .Net

Everyday I send message with attachment so ok. But today I get error about "unsupportted media type"

Please help me handle it.

send attachment
1570263418892.png (54.3 KiB)
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered ·

The error message said "unsupported media type". What type of media content was the attachment?

Here are those supported content types:

• Images: jpg/jpeg, png, gif, bmp, tif/tiff
• Videos: 3gp, mp4, mpeg, flv, wmv, mov
• Audio: mp3
• Files: vcf/vcard, zip, rtf, html

1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

justin-nguyen11499 avatar image
justin-nguyen11499 answered ·

Yes, I have followed above formats. Before It take place error, I still send image whose format is .jpg and it's successfull but when I create another app and install your library so it take error.

1 comment
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

I find problem. It work when I send .png but when I send .jpg then it takes place above error.

0 Likes 0 ·
Anirban avatar image
Anirban answered ·

png files should not be a problem as it is under allowed file type which means you can send png as attachment.

Pls make sure your file name is correct and don't contains special characters.

Also pls post the full stack trace for better visibility.

1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.