Returning Image (Binary)

Started by JTaylor, August 04, 2015, 07:12:06 PM

Previous topic - Next topic

JTaylor

Given

  WebOut("Content-Type: image/jpg",2)
  WebOutBinary(bb)

what do I need to do to make this work in IE?   It works fine in FireFox and Chrome, returning the appropriate image, so I assume my buffer and database request are fine. 

It prompts me to "Open" or "Save" the response.  Hopefully not an IE configuration issue since that would make it unusable :-(

Seems like I tend to have these type of issues with IE more so than the other browsers but can't remember what I have done to overcome the problem.  Granted I haven't tried this with WebBatch before.   Just dawned on me that I could.


Jim

JTaylor


....IFICantBYTE

I'm only answering because no body else did, but I don't have too much to offer...
It's probably presenting just a picture file to the browser, and IE just says, ok, you want to save or open this file... the other browsers interpret that as oh, I can display this, so they do.
If you can somehow wrap some simple <HTML> tags or com .image something code around it to say to IE - render this in your own window, don't treat it as a downloaded file, then I guess it should work?

Sorry, not that helpful I know.

Regards,
....IFICantBYTE

Nothing sucks more than that moment during an argument when you realize you're wrong. :)

JTaylor

Yeah...starting to think nobody likes me :'(

I think it will work within HTML.  Tried it earlier with the same thought and worked in an embedded browser...just hadn't got back to here to delete my post.

Thanks.   Hoping someone will respond to my other post as well with a good answer.   That one I haven't been able to crack yet.

Thanks again.

Jim

td

Can't offer any specific suggestions but when we encounter similar problems on our sites the solution usually involves some kind of mime type change.  Finding a type or types that work for all browsers usually involves some web searching and trial and error testing.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

Thanks.  I  think it works okay if embedded in a web page.   Just doesn't display directly but if I download what it wants me to save, the image is there so all is working in that sense.   Wish it had dawned on me sooner that I could return such data from WebBatch.  May not have written my WebService server though if that had happened so that is one benefit of me being so dense :-)  Thanks again.

Jim