i might be wrong, but won't you need to <CFFile Action="Read"> the file you
just uploaded, then do your ToBase64, toBinary stuff on the contents of
that read?


Duncan Cumming
IT Manager

http://www.alienationdesign.co.uk
mailto:[EMAIL PROTECTED]
Tel: 0141 575 9700
Fax: 0141 575 9600

Creative solutions in a technical world

----------------------------------------------------------------------
Get your domain names online from:
http://www.alienationdomains.co.uk
Reseller options available!
----------------------------------------------------------------------
----------------------------------------------------------------------


                                                                                       
                               
                    "Douglas                                                           
                               
                    McKenzie"               To:     <[EMAIL PROTECTED]>      
                               
                    <doug@clevermonk        cc:                                        
                               
                    eys.co.uk>              Subject:     RE: [ cf-dev ] decrypting a 
base64 encoded image             
                                                                                       
                               
                    11/20/02 04:20                                                     
                               
                    PM                                                                 
                               
                    Please respond                                                     
                               
                    to dev                                                             
                               
                                                                                       
                               
                                                                                       
                               



this is what Ive tried:

<cffile action="UPLOAD" filefield="form.image"
destination="D:\CFusionMX\wwwroot\Cyberdog\Assets" nameconflict
="OVERWRITE">
           <cfset base64=tobase64(form.image)>
<!--- tried it with cffile.serverfile too--->
           <cfset binary = toBinary(base64)>
           <cffile action="WRITE" file="D:
\CFusionMX\wwwroot\Cyberdog\Assets\test.jpg"
output="#binary#" addnewline="No">

it generates a 1k file rather than the 30k one Im looking for

-----Original Message-----
From: Spike [mailto:[EMAIL PROTECTED]]
Sent: 20 November 2002 16:15
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] decrypting a base64 encoded image


You should be able to turn base64 in to binary data using the tobinary()
function.

Once you've done that, you'll need to save the result to disk and either
server the image using an <img> tag, or using cfcontent.

Spike

Stephen Milligan
Team Macromedia - ColdFusion
Co-author 'Reality Macromedia ColdFusion MX: Intranets and Content
Management'
http://spikefu.blogspot.com

> -----Original Message-----
> From: Douglas McKenzie [mailto:[EMAIL PROTECTED]]
> Sent: 20 November 2002 17:09
> To: CF-Dev
> Subject: [ cf-dev ] decrypting a base64 encoded image
>
>
> Hi,
>
> I've got an XML document which gets sent to the server with a
> load of info in. One of the fields is an image field which
> contains the base64 encoded version of the image.
>
> My question is how do you convert that information back into an image?
>
> I've been trying out the toString and toBinary functions but
> none are working. Or should I be looking at content-header types?
>
> Trying this with CFMX.
>
> Any help would be much appreciated as I've run out of ideas.
>
> Cheers,
> Douglas McKenzie
>
> ----------------------------------------
> Internet Developer / Designer
> [EMAIL PROTECTED]
> 07984 462 516
> ----------------------------------------
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED] For human help, e-mail:
> [EMAIL PROTECTED]
>
>
>


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]



--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]






-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to