Skip to main content
Participant
May 28, 2008
Question

file upload from form using cf8 file functions within cfscript?

  • May 28, 2008
  • 1 reply
  • 427 views
essentially, i'm wondering if anyone can give me an example of a way to replicate cffile upload using cf8's native file manipulation functions within a cfscript tag?

more specifically, i am wondering if anyone had any code examples for uploading a file specified by a user on an html form using cf8's file functions (fileOpen, fileCopy, fileDelete, fileMove, fileClose, etc....) within a cfscript tag. i've done this a number of times in the past using upload through cffile, but i'd like to take advantage of cf8's new native file functions and be able to deploy the code within a cfscript block.

i've found some simple examples of the file functions within the docs and online, but nothing showing me how to take a file from an html form and upload it where i want it, as cffile will do.

thanks in advance for any help.
This topic has been closed for replies.

1 reply

Inspiring
May 28, 2008
those cf8 file functions are for manipulating files on the server.
you still need to upload the file in one way or another.

as for replicating cffile action=upload in cfscript: just write a
function that uses cffile tag to upload a file, and call that function
from your cfscript!


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/