am i doing something wrong here it is downloading ...
# lucee
s
am i doing something wrong here it is downloading the ics file instead of attaching it https://trycf.com/gist/6cde1a9be38c9c24d9d7a5eff63e2f13/lucee5?theme=monokai
a
Yes, it's doing what you are telling it to do:
Copy code
<cfcontent type="text/calendar" reset="Yes">
<cfheader name="Content-Disposition" value="attachment; filename=Learning.ics">
That says "send
Learning.ics
to the browser" I think you don't need those lines, given all you want to do is email it. Much better example & clear question, btw.
šŸ‘šŸ¼ 1
Make sure to always read the docs before you use the functionality in question. Or as a refresher when things aren't working the way you expect. https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-g-h/cfheader.html - the very first sentence is pretty clear as to what it's for. Also here: https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-c/cfcontent.html - should be ringing alarm bells as it says "Sets the MIME content encoding header *for the current page*" (my emphasis). You aren't trying to do either of those things. Seriously: I keep saying "read the docs", it's not for no reason. I also don't mean "open the docs page and scan yer eyes across it, sigh, and move on". I do mean read and understand the docs. This might take some time and some application, but it's critical for beginner CFMLers if one wants to advance to anything beyond "beginner".
šŸ‘šŸ¼ 1
g
And let me add - if you still don't get it - that's cool, too. Continue to experiment and ask questions along the way. Making sure that your question reads something like... • I want THIS to happen. • Here is the code I am using • here is what I am understanding it should be doing • But... this OTHER is happening Let's everyone else know what you have tried (so you don't get a reply that is something you have already tried) Let's everyone else know that you have tried and you're not "just" being lazy. And for me - when I actually start writing like this - I find that I work it out for myself - as I suddenly realise my mistake.... Eg. I am having an issue and I start writing about my use of the function... "XXXX_ARRAY_YYYY" isn't working the way I want.... TaaDaa,,,, Because you're an idiot Gavin - and using an array function on a struct! Adam - is quite vocal about; "Tell us what you have tried" "Tell us what you're exepecting" "Tell us about what you're not understanding" And it could "seem" that he is a grumpy old man that hasn't enough coffee - or is well overdue for a holiday... or both! But if you could ever quantify the blog posts / replies in threads / etc... you'll find he is one of the most prolific "helpers" to the CFML community. Help us, to help you.
a
I'll have you know I can be a caffeine-starved grumpy old man and be helpful at the same time! šŸ˜‰
šŸ˜† 2