![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: decoding base64 data on client/browser? >Thread Next - Re: decoding base64 data on client/browser? Re: decoding base64 data on client/browser?To: NULL Date: 3/6/2006 4:36:00 PM Huh? What are you talking about? These discussion boards are not for questioning people's logic for doing stuff -- I can probably name 10 very logical reasons one would do what I'm trying to do. If anyone should be insulted, it's me. I'm the one that had someone post -- in response to my question -- nothing towards a solution, and only questioning my reasons for wanting to do something. And frankly, WHY someone on here is doing something is none of anyone else's business, but I wanted to more just leave the gentleman's response alone rather than make a post about etiquet. Just to start a list of reasons why one would want to do what I'm doing: 1. The bandwidth of base64 encoding is significantly less than the bandwidth of HTTP encoding -- which can be significant when the files grow. 2. One might want to receive metadata along with the file, so JavaScript can perform additional tasks based on that metadata. 3. One might want to download 20 files instead of just one. 4. One might want to query for information, including binary data, without causing a browser refresh. 5. One might need a multi-step handshake to take place, and that handshake might include binary data. 6. One might want to send multiple files -- or binary data blobs -- and not have an HTTP file receive object at the server Well, there's just six... But it only took me about 10 minutes to think of, and type those reasons. -b "Peter Flynn" wrote: > Brandon wrote: > > Does this mean you have no information that can help with the issue actually > > at hand? Or, are you suggesting that I don't base64 encode the file before > > sending it, and just send the binary file "as is?" The reason is, an XML > > field cannot contain bindary data. You have to assume that a binary > > combination will occur that will cause the XML to appear malformed. > > > > Thanks Peter! Please let me know if you have any suggestions. > > Sorry, I phrased that ambiguously. I meant why send it as XML at all. > If I click on a link to an image, I don't expect an XML file back with > an embedded image: I expect the binary image data sent as image/gif or > image/jpg or whatever. I don't see why it needs to be encapsulated in > XML. > > ///Peter > > > -b > > > > "Peter Flynn" wrote: > > > >> Brandon wrote: > >>> My browser app sends a request to the server for a binary file. The server > >>> receives the request, converts the file to base64, packages it up in XML, and > >>> returns it to the client/browser. > >> Is there a reason for doing this? Why not just send the binary file as-is? > >> > >> ///Peter > >> -- > >> XML FAQ: http://xml.silmaril.ie/ > >> > | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
