[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:

Sku numbers (1997) still having shipCost.db Problem (1997) WebCat2b13MacPlugIn - More limits on [include] (1997) cookies and [returnraw] (1997) [WebDNA] Feature Request (2013) Database Advice (1996) Extended [ConvertChars] (1997) turning every 5th line red (1998) different browser, different result (2000) Permissions / Restart WebDNA? (2005) SSL and reg web* (1997) problem: search crashes webstar (1997) WebCat2 beta 11 - new prefs ... (1997) WebCat2b12 - nesting [tags] (1997) and more [shipcost].... (2001) Setting up shop (1997) [WebDNA] agree? --> [url] broken inside [redirect], on a square-bracket-style (2009) WebCatalog for guestbook ? (1997) PSC recommends what date format yr 2000??? (1997) cybercash on OSX - was Executing remote AppleScript (2000)