users@jersey.java.net

Re: [Jersey] Sending binary files over multipart/mixed

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 24 Nov 2008 22:07:25 +0100

On Nov 24, 2008, at 9:44 PM, Gili wrote:

>
> Hi,
>
> I was under the impression that multipart/mixed used MIME and MIME
> allowed
> transparent transfer of binary data (versus say XML). Then today I ran
> across http://www.pcnineoneone.com/howto/ftp1.html which says "your
> file is
> encoded as text in the data stream, and converted back to binary on
> your
> end. The encoding adds considerable overhead to the transmission."
>
> Huh? It sounds to me like he's implying that MIME requires base64
> encoding.
> So who is right? Does MIME transfer binary data with or without
> encoding?
>

In the following:

   When you download a file from a Web server using HTTP (Hyper Text
Transfer Protocol), or send/receive a file as an e-
   mail attachment, the data is first encoded in MIME (no, it's not a
clown that doesn't talk, it stands for Multipurpose
   Internet Mail Extensions). Basically, that means your file is
encoded as text in the data stream, and converted back to
   binary on your end. The encoding adds considerable overhead to the
transmission.

the bit about HTTP is complete nonsense. The bit about using multipart
MIME for *email* is true because of compatibility with 7 bit SMTP
servers. But that does not restrict MIME multipart to 7 bit. Just look
at MTOM/XOP or uploading binary files using multipart/form-data for
HTML forms.

Paul.

> Thank you,
> Gili
> --
> View this message in context: http://n2.nabble.com/Sending-binary-files-over-multipart-mixed-tp1573660p1573660.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>