You can handle file uploads using the form field directly without using
cffile if that meets your needs.  The form field value will be a path to the
temp file where it's stored.

This is useful for example if you want to read in the file and process it
but don't need to make a copy.

It's not documented behavior so it could change in the future...

Sam

> -----Original Message-----
> From: Dave Watts [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 20, 2004 4:16 PM
> To: CF-Talk
> Subject: RE: CFFile upload problem
>
> > What I'm finding is that the form field contains a temp file name
> >
> > <cfif Len(form.premphoto)>
> >   <cfoutput>#form.premphoto#</coufput>
> >   <cffile ...>
> > </cfif>
> >
> > C:\WINNT\TEMP\ACFA4A2.tmp
> >
> > That file is nowhere to be found on the server, so I assume
> > either CF or IIS is cleaning up after it generates the page
> > sent back to the browser.
> >
> > Is that the expected behavior, to end up with a local file
> > name after the form submisssion, or is it behaving like this
> > because of the error?
>
> The form variable containing your uploaded file isn't a
> string; you can't
> just check its length and output it. Until you run your
> CFFILE tag, it's
> just a pointer of sorts to the temporary file created by the
> server when a
> file is uploaded. I suspect that your code might work if you
> just had the
> CFFILE tag.
>
> Dave Watts
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to