Coldfusion file download example
Collectives on Stack Overflow. Learn more. Download file in coldfusion and read its content Ask Question. Asked 11 years, 6 months ago. Active 11 years, 6 months ago. Viewed 4k times.
Deepak Yadav. Deepak Yadav Deepak Yadav 1, 3 3 gold badges 22 22 silver badges 37 37 bronze badges. Add a comment. Active Oldest Votes.
I'm not certain I understand the question, but let me try anyway: Using cfhttp, you can submit the form variables to the URL, and get back the data. If this does not answer what you are asking, please clarify the question. Ben Doom Ben Doom 7, 1 1 gold badge 26 26 silver badges 30 30 bronze badges. Actually I am not getting any data, I am getting a xls file. I want to save that file and read it content. Please try it once you will understand what I am asking for.
Are you attempting to open this file on the server, so that CF can manipulate it, or push the file to the client browser? Mark Porter Mark Porter 1, 9 9 silver badges 9 9 bronze badges. And cfhttp. Because after hitting the above url we get an excel file to save or open. Even when I save the file from a browser it has 0 bytes. Hey thanks Leigh.. That was a bit wrong url. I am sorry for wasting all of yours time.
Well, glad you found the problem. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
Email Required, but never shown. The Overflow Blog. The following are common MIME content types:. You use the cfcontent tag to change the MIME content type that returns to the browser along with the content generated from your ColdFusion page. The cfcontent tag has one required attribute, type, which defines the MIME content type returned by the current page.
As you might expect, it is also written in HTML. Excel converts the table to a spreadsheet. Legal Notices Online Privacy Policy. Using cfcontent Search. The ColdFusion file that you write in steps 3 through 7 calls this file. Save the file as cfcontent. In cfcontent.