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

File upload using CFSCRIPT?

New Here ,
Aug 08, 2008 Aug 08, 2008

Copy link to clipboard

Copied

I want to upload a file using code inside the cfscript tag. I can only find ways to use it with the CMFL tags. I want to use the script method due to other that depends on it in the cfscript tag. How can I do this? Thanks.

Ryan
TOPICS
Advanced techniques

Views

465

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
LEGEND ,
Aug 08, 2008 Aug 08, 2008

Copy link to clipboard

Copied

write a function with the tags and call it from cfscript.

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
Valorous Hero ,
Aug 08, 2008 Aug 08, 2008

Copy link to clipboard

Copied

rpeters1983 wrote:
> I want to upload a file using code inside the cfscript tag.

You could write a wrapper function that contains the cffile tag. Then call your custom function from inside your cfscript. The CFML library at cflib.org uses that concept. An example is the Dump function. It mimics the <cfdump> tag.
http://cflib.org/udf/Dump

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
New Here ,
Aug 08, 2008 Aug 08, 2008

Copy link to clipboard

Copied

ah! makes perfect sense. Thanks!

<--- CF noob. sorry.

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
LEGEND ,
Aug 08, 2008 Aug 08, 2008

Copy link to clipboard

Copied

LATEST
> I want to use the script method due to other
> that depends on it in the cfscript tag

Really? I can't think what might *depend* on CFScript.

What is it?

--
Adam

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