Re: cffile in a CFC

2009-03-07 Thread Gerald Guido
This function will upload a file. http://coz.pastebin.com/f4eb4bbaa The full CFC is on my interblog if you are interested. http://www.myinternetisbroken.com/files/FileUpload.cfc.zip Here is the basic usage for the cfc uppload = application.FileUpload.upload("form.My

Re: cffile in a CFC

2009-03-07 Thread Will Tomlinson
> I have a user submitting an image via a form. > > I would like to make a function in my cfc to upload the file. What do > I put in the fileField attribute of CFFile? > > Arguments.TitleImage or Form.TitleImage? > > What type do I set for the cfargument? String? Binary? > http://corfi

Re: cffile in a CFC

2009-03-07 Thread Dominic Watson
If the name of the form field is 'TitleImage', you would just put 'TitleImage'. You may wish to pass the form field name as the argument; otherwise no argument would be required. It feels kinda nasty but if you are to do cffile uploads inside a function there's little choice. HTH, Dominic ~

cffile in a CFC

2009-03-07 Thread Chad Gray
I have a user submitting an image via a form. I would like to make a function in my cfc to upload the file. What do I put in the fileField attribute of CFFile? Arguments.TitleImage or Form.TitleImage? What type do I set for the cfargument? String? Binary? ~~

RE: cffile in a cfc

2003-01-17 Thread Darren Adams
BINGO, I think that has cracked it !! Cheers Todd !!! > -Original Message- > From: Todd [mailto:[EMAIL PROTECTED]] > Sent: 17 January 2003 17:53 > To: CF-Talk > Subject: RE: cffile in a cfc > > It can't be arguments.file either... again, it has to be the "

RE: cffile in a cfc

2003-01-17 Thread Todd
-Original Message- > > From: Todd [mailto:[EMAIL PROTECTED]] > > Sent: 17 January 2003 17:45 > > To: CF-Talk > > Subject: Re: cffile in a cfc > > > > Sounds like you're surrounding the the form field with ##'s and you > > shouldn't be.

RE: cffile in a cfc

2003-01-17 Thread Darren Adams
The form field attribute is set to "arguments.file" it doesn't have ##'s around it. > -Original Message- > From: Todd [mailto:[EMAIL PROTECTED]] > Sent: 17 January 2003 17:45 > To: CF-Talk > Subject: Re: cffile in a cfc > > Sounds like you'r

Re: cffile in a cfc

2003-01-17 Thread Todd
Sounds like you're surrounding the the form field with ##'s and you shouldn't be. filefield should be the actual form field name is and not the contents of that form field. ~Todd At 05:35 PM 1/17/2003 +, you wrote: >Hello All, > >Does anyone know if you can us

cffile in a cfc

2003-01-17 Thread Darren Adams
Hello All, Does anyone know if you can use cffile in a cfc ? I have converted a form action page to a cfc and I get the old chestnut about "the form field does not contain a file" error. The form enc type is fine as it works if I put the old code back in. It only errors when I