Part of my application allows the upload of images to the server using a multi-part form and I'm using Chilkat's Mime functions to save the images but I've run into a problem. I've been working with Matt Fausey of Chilkat trying to figure it out and he said it looks like HttpRequest:Content is converting the binary data of the mime message to utf-16 which is causing the issue.
Since the documentation is still pretty sparse even after all these years, I've been unable to find out much about it and was wondering if there is a way to prevent it from converting the image data. Or, is there a way with the Foundation version of CXP to save the files directly?
HttpRequest:Content and binary data
Re: HttpRequest:Content and binary data
After some searching I realized there is a sample for saving files in the cxp web samples which I was able to use and can get it save files based on the settings in global.config.
My question now is, How do I properly save the file from the oHttpUploadedFile:Data if I want to?
My question now is, How do I properly save the file from the oHttpUploadedFile:Data if I want to?
Re: HttpRequest:Content and binary data
We use Base64-encoding for any kind of binary data transported from or to our servers.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: HttpRequest:Content and binary data
Thanks Tom,
I understand the need for converting binary data to base64 for transporting but I'm a little confused how to convert it in the client browser before sending to the server. I was under the impression (obviously wrong) that modern browsers automatically encoded data during a POST.
I understand the need for converting binary data to base64 for transporting but I'm a little confused how to convert it in the client browser before sending to the server. I was under the impression (obviously wrong) that modern browsers automatically encoded data during a POST.