[WebDNA] ReturnRaw and binarybody

This WebDNA talk-list message is from

2013


It keeps the original formatting.
numero = 110511
interpreted = N
texte = --047d7b414222866d1f04e243b6d6 Content-Type: text/plain; charset=UTF-8 Hi all, I'm trying to store an image in binary (i.e. Base64 encoded) format and then serve it out using [returnraw] - basically I want to avoid having to place the image into a folder on the server, rather store it in the actual template. Can this be done? How does 'binarybody' work, i.e. can I pass Base64 data to it somehow? Code so far is: [text]binaryFile=[decrypt method=Base64]base_64_encode_of_image[/decrypt][/text] [text]line_ending=%0D%0A[/text] [returnRaw binarybody=[binaryFile]]HTTP/1.0 200 OK[unurl][line_ending][/unurl][!] [/!]Status: 200[unurl][line_ending][/unurl][!] [/!]Content-Type: image/gif[unurl][line_ending][/unurl][!] [/!][/returnraw] Thanks - Tom --047d7b414222866d1f04e243b6d6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

I'm trying to store an image in binary (i.e. Base64= encoded) format and then serve it out using [returnraw] - basically I want= to avoid having to place the image into a folder on the server, rather sto= re it in the actual template.

Can this be done? =C2=A0 How does 'binarybody' = work, i.e. can I pass Base64 data to it somehow?

C= ode so far is:


[text]binaryFil= e=3D[decrypt method=3DBase64]base_64_encode_of_image[/decrypt][/text]


[text]line_ending=3D%0D%0A[/text]
<= div>
[returnRaw binarybody=3D[binaryFile]]HTTP/1.0 200 OK[unu= rl][line_ending][/unurl][!]

[/!]Status: 200[unurl]= [line_ending][/unurl][!]

[/!]Content-Type: image/gif[unurl][line_ending][/unurl]= [!]

[/!][/returnraw]


Thanks
- Tom




--047d7b414222866d1f04e243b6d6-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] ReturnRaw and binarybody (WebDNA 2013)
  2. Re: [WebDNA] ReturnRaw and binarybody (Tom Duke 2013)
  3. Re: [WebDNA] ReturnRaw and binarybody (WebDNA 2013)
  4. Re: [WebDNA] ReturnRaw and binarybody (Tom Duke 2013)
  5. Re: [WebDNA] ReturnRaw and binarybody (WebDNA 2013)
  6. Re: [WebDNA] ReturnRaw and binarybody (WebDNA 2013)
  7. Re: [WebDNA] ReturnRaw and binarybody (Tom Duke 2013)
  8. Re: [WebDNA] ReturnRaw and binarybody (WebDNA 2013)
  9. [WebDNA] ReturnRaw and binarybody (Tom Duke 2013)
--047d7b414222866d1f04e243b6d6 Content-Type: text/plain; charset=UTF-8 Hi all, I'm trying to store an image in binary (i.e. Base64 encoded) format and then serve it out using [returnraw] - basically I want to avoid having to place the image into a folder on the server, rather store it in the actual template. Can this be done? How does 'binarybody' work, i.e. can I pass Base64 data to it somehow? Code so far is: [text]binaryFile=[decrypt method=Base64]base_64_encode_of_image[/decrypt][/text] [text]line_ending=%0D%0A[/text] [returnRaw binarybody=[binaryFile]]HTTP/1.0 200 OK[unurl][line_ending][/unurl][!] [/!]Status: 200[unurl][line_ending][/unurl][!] [/!]Content-Type: image/gif[unurl][line_ending][/unurl][!] [/!][/returnraw] Thanks - Tom --047d7b414222866d1f04e243b6d6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

I'm trying to store an image in binary (i.e. Base64= encoded) format and then serve it out using [returnraw] - basically I want= to avoid having to place the image into a folder on the server, rather sto= re it in the actual template.

Can this be done? =C2=A0 How does 'binarybody' = work, i.e. can I pass Base64 data to it somehow?

C= ode so far is:


[text]binaryFil= e=3D[decrypt method=3DBase64]base_64_encode_of_image[/decrypt][/text]


[text]line_ending=3D%0D%0A[/text]
<= div>
[returnRaw binarybody=3D[binaryFile]]HTTP/1.0 200 OK[unu= rl][line_ending][/unurl][!]

[/!]Status: 200[unurl]= [line_ending][/unurl][!]

[/!]Content-Type: image/gif[unurl][line_ending][/unurl]= [!]

[/!][/returnraw]


Thanks
- Tom




--047d7b414222866d1f04e243b6d6-- Tom Duke

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[WebDNA] Quick grep question (2009) [ShowCart] and GET vs. POST (1997) replace problem (1999) WebCatalog Plug-in for Webstar. (1997) Applescript error (1998) Strange search/writefile issue (2004) two unique banners on one page (1997) WebCat name recognition (was MacFinder -- a new WebDNAweb site) (1998) WCS Newbie question (1997) Robots fill event log (1997) Did you hear about this? (1997) Generating unique SKU from [cart] (1997) Where is f2? (1997) in string ??? (2001) f2 download problems (1997) Resume Catalog ? (1997) Smith Micro Site (2000) [isfolder] and [filename] (1997) WC2b15 - [HTMLx]...[/HTMLx] problems (1997) dollar $ signs in database (2000)