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

Cfcontent in IE

Advisor ,
Sep 22, 2015 Sep 22, 2015

Copy link to clipboard

Copied

Hi all,

This is my code to download an excel file.

<cfspreadsheet action="write" filename="#local.location#\#local.fileName#" query="local.qryResultset" overwrite="false" /> 

<cfheader name="Content-Disposition" value="inline; filename=#local.fileName#;" />

<cfcontent file="#local.location#\#local.fileName#" type="application/msexcel" reset="no" deletefile="yes" />

All my variables are passing fine. The process worked fine in firefox but in IE i have an issue (http or https), it shows an error at the time of saving the file:

LOCALNAME20150922153304.xls might have been moved or deleted.

It looks like IE is caching the name somewhere?

Any ideas?

We are using Coldfusion 10.

Best,

Views

411

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

correct answers 1 Correct answer

Advisor , Sep 22, 2015 Sep 22, 2015

I changed the word inline for attachment and it works.

<cfheader name="Content-Disposition" value="inline; filename=#local.fileName#;" />

For:

<cfheader name="Content-Disposition" value="attachment; filename=#local.fileName#;" />

I hope this help someone else.

Best.

Votes

Translate

Translate
Advisor ,
Sep 22, 2015 Sep 22, 2015

Copy link to clipboard

Copied

I deleted all the excel files.

The first time works and create the excel file the second time it doesn't work and create a file as LOCALACCOUNTNAME20150922165514209.xls.q62hqlo.partial

If I deleted all the excel files the first time works again. This is crazy

BTW we are using IE 11.

Any ideas?

Thanks in advanced

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
Advisor ,
Sep 22, 2015 Sep 22, 2015

Copy link to clipboard

Copied

LATEST

I changed the word inline for attachment and it works.

<cfheader name="Content-Disposition" value="inline; filename=#local.fileName#;" />

For:

<cfheader name="Content-Disposition" value="attachment; filename=#local.fileName#;" />

I hope this help someone else.

Best.

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