Set Content-Type in MMS from Java

Set Content-Type in MMS from Java SearchSearch
Author Message
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8138
Registered: 10-2002
Posted on Tuesday, March 29, 2016 - 08:00 pm:   

From our support mailbox:


quote:

Hi

I need to send an MMS with png files as attachments.

I am using the java code from here: http://www.nowsms.com/doc/submitting-mms-messages/send-mms-message-with-java

However the attachment filenames are WITHOUT extension (.png) so it does not work using

addparameter(“MMSFile”,file) since that expects the correct extension.

Is there any way to set the content-type for an attachment?




Hi,

No, there is not.

Even if you modify the Java code to pass content-type as a parameter instead of relying on guessContentTypeFromName, for this interface, NowSMS would ignore it, and still expects to determine content-type based on the file extension.


-bn

Bryce Norwood
Now SMS/MMS Support

Add Your Message Here, or click here to start a new topic.
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image
Options: Automatically activate URLs in message
Action: