Sending binary data (General questions)
I am just testing your WebServer component in PowerBuilder 9, everything works fine [:smile:], but I do have troubles sending binary data, because response.body is a string, and PB only has zero-terminated
versions of strings, so it stops at the first ch(0).
Is there an easy way (besides saving the binary data to a file and sending it)?
Thanks,
Roland
Re: Sending binary data
Roland,
I don't think there's convinient (and fast) way to do it. Can you convert your strings to BSTR?
Anyway... If you use binary data, how do you keep in char*?
Re: Sending binary data
Anyway... If you use binary data, how do you keep in char*?
In PB, there's a binary data type called blob, i create the data in there and want to service it to the browser. What can I do if i cannot use response.body, can i write a file and have wodWebServer send that out?
Re: Sending binary data
Roland,
yes. When I think more, when you access Body property then wodWebServer internally accesses file defined in Filename property, and reads/writes it for you.
So, you can do it as you suggested - read and write to a file, and then use Request.Filename (or Response.Filename) to point wodWebServer to that file.