Base64 image encoding

Base64 image encoding SearchSearch
Author Message
Latitude De
New member
Username: Latitudede

Post Number: 42
Registered: 07-2009
Posted on Thursday, November 19, 2009 - 02:58 pm:   

Hi,

I have a question regarding image emcoding. I am sending MO MMS with an image attachment from device to my Now SMS/MMS which is forwarding it to my application. I noticed that the image is encoded into base64. Does Now SMS/MMS does this?

Thanks.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 1449
Registered: 08-2008
Posted on Friday, November 20, 2009 - 03:33 pm:   

Hi,

Yes.

Content is always raw binary in the over the air MM1 protocol.

In MM7, it can be binary or it can use encoding mechanisms defined in RFC2045, such as base64.

NowSMS uses base64 when it translates to MM7 format because the MM7 example in 3GPP TS 23.140 shows base64 encoding.

--
Des
NowSMS Support
Latitude De
New member
Username: Latitudede

Post Number: 44
Registered: 07-2009
Posted on Monday, March 22, 2010 - 12:36 pm:   

Hi,

As I understood, MM7 message can have image in binary or in base 64 though Now SMS/MMS sends it in base 64. In either case, is it a must that the encoding is specified in the MM7 message itself?

e.g.:
Content-Transfer-Encoding : binary

Can you could send me specs regarding that?

Thanks.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 1956
Registered: 08-2008
Posted on Monday, March 22, 2010 - 04:34 pm:   

Hi,

That's a good question.

To answer that definitively, you would have to trace back through the different specifications upon which MM7 (3GPP TS 23.140) references for its building blocks.

My recommendation would be that if you are generating the content, you SHOULD include Content-Transfer-Encoding: binary.

If there is no "Content-Transfer-Encoding:" header, my recommendation would be to ASSUME that the content is binary.

3GPP TS 23.140, when discussing content encoding for MM7 makes reference to internet RFC 2045.

RFC 2045 says:

quote:

"Content-Transfer-Encoding: 7BIT" is assumed if the Content-Transfer-Encoding header field is not present.




So, you will note that my ASSUMPTION does not follow the specification. However, I think my assumption makes more sense in the real world.

RFC 2045 was originally developed for SMTP message encoding, where there is a need to support legacy SMTP servers that can only handle 7-bit data.

However, the transport for MM7 is HTTP, which has no such 7-bit limitation.

As such, I think my assumption makes sense.

However, if you are generating binary content, you should include "Content-Transfer-Encoding:", so that you are following RFC 2045.

--
Des
NowSMS Support