Re: [WebDNA] ReturnRaw and binarybody

This WebDNA talk-list message is from

2013


It keeps the original formatting.
numero = 110519
interpreted = N
texte = --Apple-Mail=_CAE4111C-4885-48CD-ACEE-59D0D5316FB5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Tom Glad you got it worked out :) You could just do this .... [TEXT]MyImage=3D[ENCRYPT method=3Dbase64&file=3Dtest.jpg][/ENCRYPT][/TEXT]= [WRITEFILE file=3Dtest.inc][MyImage][/WRITEFILE] It also gives you the possibility of storing images in a db or a = preferences file. Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 24/07/2013, at 10:43 PM, Tom Duke wrote: > Stuart, >=20 > Hi - last post on this I promise. I just got there using a [shell] = script as you were suggesting. Final code is below, could be useful = for any situation where an image needs to be stored in a template. >=20 > - Tom >=20 >=20 >=20 > [!] > [/!][!] >=20 > ------------------------------------ > ### Do processing stuff here ### >=20 > [/!][!] >=20 > ------------------------------------ > ### Check for image and serve it out here ### >=20 > [/!][showif [fileinfo file=3Dblank.gif][exists][/fileinfo]=3DF][!] > = [/!][text]blank-gif-base64=3DR0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABA= AEAAAICRAEAOw=3D=3D[/text][!] > [/!][writefile file=3Dblank.gif][shell]echo [blank-gif-base64] | = base64 --decode[/shell][/writefile][!] > [/!][/showif][!] >=20 > [/!][text]crlf=3D[unurl]%0D%0A[/unurl][/text][!] >=20 > [/!][returnRaw binarybody=3Dblank.gif]HTTP/1.0 200 OK[crlf][!] >=20 > [/!]Status: 200[crlf][!] >=20 > [/!]Content-Type: image/gif[crlf][crlf][!] >=20 > [/!][/returnraw] >=20 >=20 >=20 >=20 > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list . To = unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us --Apple-Mail=_CAE4111C-4885-48CD-ACEE-59D0D5316FB5 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii Tom

Glad you got it worked out :)

You could just do this ....

[TEXT]MyImage=[ENCRYPT method=base64&file=test.jpg][/ENCRYPT][/TEXT]

[WRITEFILE file=test.inc][MyImage][/WRITEFILE]

<img src="data:image/jpg;base64,[INCLUDE file=test.inc]">

It also gives you the possibility of storing images in a db or a preferences file.

Regards

Stuart Tremain
IDFK Web Developments
AUSTRALIA




On 24/07/2013, at 10:43 PM, Tom Duke <tom@revolutionaries.ie> wrote:

Stuart,

Hi - last post on this I promise.   I just got there using a [shell] script as you were suggesting.   Final code is below, could be useful for any situation where an image needs to be stored in a template.

- Tom



[!]<!-- HAS_WEBDNA_TAGS -->
[/!][!]

------------------------------------
###  Do processing stuff here  ###

[/!][!]

------------------------------------
###  Check for image and serve it out here  ###

[/!][showif [fileinfo file=blank.gif][exists][/fileinfo]=F][!]
[/!][text]blank-gif-base64=R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==[/text][!]
[/!][writefile file=blank.gif][shell]echo [blank-gif-base64] | base64 --decode[/shell][/writefile][!]
[/!][/showif][!]

[/!][text]crlf=[unurl]%0D%0A[/unurl][/text][!]

[/!][returnRaw binarybody=blank.gif]HTTP/1.0 200 OK[crlf][!]

[/!]Status: 200[crlf][!]

[/!]Content-Type: image/gif[crlf][crlf][!]

[/!][/returnraw]




--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us

--Apple-Mail=_CAE4111C-4885-48CD-ACEE-59D0D5316FB5-- 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)
--Apple-Mail=_CAE4111C-4885-48CD-ACEE-59D0D5316FB5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Tom Glad you got it worked out :) You could just do this .... [text]MyImage=3D[ENCRYPT method=3Dbase64&file=3Dtest.jpg][/ENCRYPT][/TEXT]= [WRITEFILE file=3Dtest.inc][MyImage][/WRITEFILE] It also gives you the possibility of storing images in a db or a = preferences file. Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 24/07/2013, at 10:43 PM, Tom Duke wrote: > Stuart, >=20 > Hi - last post on this I promise. I just got there using a [shell] = script as you were suggesting. Final code is below, could be useful = for any situation where an image needs to be stored in a template. >=20 > - Tom >=20 >=20 >=20 > [!] > [/!][!] >=20 > ------------------------------------ > ### Do processing stuff here ### >=20 > [/!][!] >=20 > ------------------------------------ > ### Check for image and serve it out here ### >=20 > [/!][showif [fileinfo file=3Dblank.gif][exists][/fileinfo]=3DF][!] > = [/!][text]blank-gif-base64=3DR0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABA= AEAAAICRAEAOw=3D=3D[/text][!] > [/!][writefile file=3Dblank.gif][shell]echo [blank-gif-base64] | = base64 --decode[/shell][/writefile][!] > [/!][/showif][!] >=20 > [/!][text]crlf=3D[unurl]%0D%0A[/unurl][/text][!] >=20 > [/!][returnRaw binarybody=3Dblank.gif]HTTP/1.0 200 OK[crlf][!] >=20 > [/!]Status: 200[crlf][!] >=20 > [/!]Content-Type: image/gif[crlf][crlf][!] >=20 > [/!][/returnraw] >=20 >=20 >=20 >=20 > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list . To = unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us --Apple-Mail=_CAE4111C-4885-48CD-ACEE-59D0D5316FB5 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii Tom

Glad you got it worked out :)

You could just do this ....

[text]MyImage=[ENCRYPT method=base64&file=test.jpg][/ENCRYPT][/TEXT]

[WRITEFILE file=test.inc][MyImage][/WRITEFILE]

<img src="data:image/jpg;base64,[INCLUDE file=test.inc]">

It also gives you the possibility of storing images in a db or a preferences file.

Regards

Stuart Tremain
IDFK Web Developments
AUSTRALIA




On 24/07/2013, at 10:43 PM, Tom Duke <tom@revolutionaries.ie> wrote:

Stuart,

Hi - last post on this I promise.   I just got there using a [shell] script as you were suggesting.   Final code is below, could be useful for any situation where an image needs to be stored in a template.

- Tom



[!]<!-- HAS_WEBDNA_TAGS -->
[/!][!]

------------------------------------
###  Do processing stuff here  ###

[/!][!]

------------------------------------
###  Check for image and serve it out here  ###

[/!][showif [fileinfo file=blank.gif][exists][/fileinfo]=F][!]
[/!][text]blank-gif-base64=R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==[/text][!]
[/!][writefile file=blank.gif][shell]echo [blank-gif-base64] | base64 --decode[/shell][/writefile][!]
[/!][/showif][!]

[/!][text]crlf=[unurl]%0D%0A[/unurl][/text][!]

[/!][returnRaw binarybody=blank.gif]HTTP/1.0 200 OK[crlf][!]

[/!]Status: 200[crlf][!]

[/!]Content-Type: image/gif[crlf][crlf][!]

[/!][/returnraw]




--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us

--Apple-Mail=_CAE4111C-4885-48CD-ACEE-59D0D5316FB5-- WebDNA

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:

WebCatalog for Postcards ? (1997) Help name our technology! (1997) emailer (1997) WCS Newbie question (1997) Sku numbers (1997) unsubscribe (1997) Anyone using Editize (inline html editor) w/ WebDNA (2003) Occasional crashes with $remove (1997) StoreBuilder and PayPal (2002) Search bug. Help (2002) [WebDNA] Snow Leoopard and v7 (2011) WebMerchant when CC network is down (1998) [WebDNA] Sorry WebDNA server not running. (2015) [WebDNA] encrypt (2016) Bug Report, maybe (1997) Multi Actions (1999) New Mac Public Beta Available (1997) Banners (1997) Webmessage Hyperboard (1998) IIS4/WebCat3.0 Authentication (1999)