• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

writeToBrowser not working in virtual host

New Here ,
Mar 06, 2020 Mar 06, 2020

Copy link to clipboard

Copied

Hi dev, I'm using CF2018. Here I've tried to use writeToBrowser action in cfimage tag. It's working fine while run via webroot but it's not working ( Image disaplyed as blank in browser ) while I'm using virtual host. But both are having same code and running places or differnent.

 

Here is my sample code:

<cfimage action="read" source="C:\ColdFusion2018\cfusion\wwwroot\download.jpg" name="google" >

<cfimage action="writeToBrowser" width='200' heigth='200' source="#google#" />

Note : I did  console on image on the browser my test application & my virtual host application have same value in img tag like below.

<img src="/CFFileServlet/_cf_image/_cfimg-5097624825542879602.PNG" heigth="200" width="200" alt="">
<img src="/CFFileServlet/_cf_image/_cfimg2796608237126268946.PNG" heigth="200" width="200" alt="">

 

But webroot show the image virtual host not showing the image in browser.

Views

208

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 06, 2020 Mar 06, 2020

Copy link to clipboard

Copied

LATEST

There are all kinds of things that can break these "fake" file paths. You might find this helpful:

 

https://www.bennadel.com/blog/1868-url-rewriting-and-coldfusions-writetobrowser-image-functionality-...

 

Dave Watts, Eidolon LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation