Hmm I tried this initially and I didn't get far.

<cfhttp url="http://www.google.com/logos/sesame_street_ensemble-hp.jpg";
readasbinary="yes">
<cfcontent type="#cfhttp.mimecontent#" variable="#cfhttp.filecontent#">

And got:

Type    Application
Detail  Error at line 1, column 7
Tag Context     CFCONTENT
(/base/data/home/apps/appp/1.337654945080422997/e.cfm, Line=2, Column=1)
Source  

1: <cfhttp url="http://www.google.com/logos/sesame_street_ensemble-hp.jpg";
readasbinary="yes">
2: <cfcontent type="#cfhttp.mimecontent#" variable="#cfhttp.filecontent#">

^ Snippet from underlying CFML source

And

<cfhttp url="http://www.google.com/logos/sesame_street_ensemble-hp.jpg";
readasbinary="yes">
<cfcontent type="image/jpeg" variable="#cfhttp.filecontent#">

Just gave me the URL of the file. 
Any other suggestions?

Paul.

 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of
Nitai @ Razuna
Sent: Tuesday, November 10, 2009 3:57 AM
To: [email protected]
Subject: [OpenBD] Re: Open BD GAE VFS

No exactly true...... You could use cfhttp with readasbinary as in:

<cfhttp url="pathtoimage.png" readasbinary="yes">
<cfcontent type="#cfhttp.mimecontent#" variable="#cfhttp.filecontent#">

Or if you need the simply <img src> tag then convert the binary first...

This way you don't need to write to the file system first.

Kind Regards,
Nitai

On Nov 10, 2009, at 6:23 AM, TM wrote:

>
> Hi Paul,
>
> You can't access the picture directly via a URL, you will have to
> access via a CFM with something like:
>
> <cffile action="readbinary" variable="photo" file="/Photos/#URL.ID#">
> <cfcontent type="image/jpeg" variable="#photo#" reset="Yes">
>
> Hope this helps.
>
> On Nov 9, 5:02 pm, "Paul Kukiel" <[email protected]> wrote:
>> I have OpenBD on GAE.
>>
>> I used cfhttp to get a file ( picture.png ) I then used cffile to  
>> write this
>> to the VFS.
>>
>> cfdirectory lists the file here:
>>
>> /base/data/home/apps/myapp/1.337642045380650872/gae:/base/data/home/ 
>> apps/we b
>> sheppaul/1.337642045380650872
>>
>> As z.png
>>
>> How can I then reference that file so I can then use z.png as an  
>> image ie
>> <img src="somePath" />
>>
>> Paul.
>
> >

--
Razuna SaaS On-Demand - Hosted Digital Asset Management Solution
http://www.razuna.com/

Razuna - Open Source Digital Asset Management
http://www.razuna.org/

Follow us on Twitter
http://twitter.com/sixsigns



--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
 http://groups.google.com/group/openbd?hl=en
 official site @ http://www.openbluedragon.org/

!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---

Reply via email to