Re: Include binary files in template/XML (SOLVED/Request new
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 59763
interpreted = N
texte = Hi. I found a solution for my problem (problem: read below).Instead of [include] i used [TcpConnect] to our own server (localhost) -used the GET command on the requsted file, encrypted til data withbase64 and saved it in a textvar.********************************* CODE EXAMPLE************************************************[text]host=yourhost.com[/text][text]filename=filename.jpg[/text][text]path=/path/to/file/[filename][/text][TCPConnect host=[host]&port=80][text]binary_encoded_data=[Encrypt method=base64][TCPSendskipheader=T]GET [path] HTTP/1.0[UnURL]%0D%0A[/UnURL]Host: [host][unurl]%0D%0A%0D%0A[/unurl][/TCPSend][/Encrypt][/text][/TCPConnect]Result Binary (base64 encoded) data here: [binary_encoded_data]********************************* /CODE EXAMPLE************************************************BUT it would be alot better/easier if one could get binary files withthe use of [include]. It would be like this [includefile=binaryfile.jpg&raw=T&binary=T]Hope Smith Micro will consider this feature in a future release....Kind RegardsMorten-----Original Message-----From: Morten Madsen Sent: 26. oktober 2004 13:35To: WebDNA TalkSubject: Include binary files in template/XMLHiI have a problem - I need to generate a XML-file with image-filesincluded in the XML tags. At first i did not think it would be any problem - my plan was to use[write file] with the XML tags and information from the database. And inthe image-tag I planned on using [include file=...&raw=t] and [encryptmethod=base64] - but sadly the include can't read the file - because thefile is a binary file - and not a text file.Example:[Encrypt method=base64][include file=image.jpg&raw=t][/Encrypt]I would like this to return the data-stream from from the file - base64encoded.Honestly I really don't know much about this subject - Have anybody madeWebcat read binary files? Is it posible at all?I found a way to do it using .NET:http://www.perfectxml.com/Answers.asp?ID=2But since our system uses Webcatalog - i would prefer making a solutioni webdna.Hope you guys can help me...Kind RegardsMorten Madsen-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail toWeb Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Hi. I found a solution for my problem (problem: read below).Instead of [include] i used [tcpconnect] to our own server (localhost) -used the GET command on the requsted file, encrypted til data withbase64 and saved it in a textvar.********************************* CODE EXAMPLE************************************************[text]host=yourhost.com[/text][text]filename=filename.jpg[/text][text]path=/path/to/file/[filename][/text][TCPConnect host=[host]&port=80][text]binary_encoded_data=[Encrypt method=base64][TCPSendskipheader=T]GET [path] HTTP/1.0[unurl]%0D%0A[/UnURL]Host: [host][unurl]%0D%0A%0D%0A[/unurl][/TCPSend][/Encrypt][/text][/TCPConnect]Result Binary (base64 encoded) data here: [binary_encoded_data]********************************* /CODE EXAMPLE************************************************BUT it would be alot better/easier if one could get binary files withthe use of [include]. It would be like this [includefile=binaryfile.jpg&raw=T&binary=T]Hope Smith Micro will consider this feature in a future release....Kind RegardsMorten-----Original Message-----From: Morten Madsen Sent: 26. oktober 2004 13:35To: WebDNA TalkSubject: Include binary files in template/XMLHiI have a problem - I need to generate a XML-file with image-filesincluded in the XML tags. At first i did not think it would be any problem - my plan was to use[write file] with the XML tags and information from the database. And inthe image-tag I planned on using [include file=...&raw=t] and [encryptmethod=base64] - but sadly the include can't read the file - because thefile is a binary file - and not a text file.Example:[Encrypt method=base64][include file=image.jpg&raw=t][/Encrypt]I would like this to return the data-stream from from the file - base64encoded.Honestly I really don't know much about this subject - Have anybody madeWebcat read binary files? Is it posible at all?I found a way to do it using .NET:http://www.perfectxml.com/Answers.asp?ID=2But since our system uses Webcatalog - i would prefer making a solutioni webdna.Hope you guys can help me...Kind RegardsMorten Madsen-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail toWeb Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
"Morten Madsen"
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:
[BULK] [WebDNA] A new commerce system for v7+ (2011)
Follow-Up to: Removing [showif] makes a big difference in speed (1997)
Browser Info.txt (1997)
Append command(2) (2000)
PCS Emailer's role ? (1997)
Multiple catalog databases and showcart (1997)
Automatic Download? (2003)
CSS in HTML emails? (2003)
[OT] Theiving B*****ds (2004)
Searching Records by Company (2000)
Updating checkboxes made easy !!! (1998)
Further tests with the infamous shipCost (1997)
Purchase Plugin Missing (1996)
Folder Follies (1998)
Re:Change WebDNA-Talk Mail due to no digest for 1wk (1997)
Date/Time format problems (1997)
Searching Multiple DBs (1997)
NT [delete] (1998)
[SearchString] problem with [search] context (1997)
webcat- multiple selection in input field (1997)