Got it to work finally. thanks for all the help.
(bild=image in german)
<cfform action="index.cfm?#urltoken#" method="POST" enablecab="Yes"
name="newseintrag" enctype="multipart/form-data" class="form"> ...
<input type="hidden" name="fuseaction" value="Newssave">
<input type="file" name="Bild" accept="image/gif,image/jpeg,image/x-MS-bmp"
class="form"> ...
<!--- Bild upload --->
<cfif len(Bild)>
<cffile action="UPLOAD"
filefield="Bild"
DESTINATION="#bilderpfad#news\"
ACCEPT="image/gif, image/jpeg, image/pjpeg,image/x-MS-bmp"
NAMECONFLICT="MakeUnique">
<CFSET attributes.Bild=File.ServerFile>
</cfif>
<cfquery name="savenews" datasource="#application.DSN#">
insert into news
(Bild)
values
('#attributes.Bild#') </cfquery> ...
daniel
> -----Urspr�ngliche Nachricht-----
> Von: Nat Papovich [mailto:[EMAIL PROTECTED]]
> Gesendet: Samstag, 20. Januar 2001 16:50
> An: Fusebox
> Betreff: RE: image upload with cffile
>
>
> This is a toughie, Daniel. I think this is a bug-ish feature of CF, and
> would hope that it gets changed in the meantime. The only thing I can
> recommend is to make a temp directory, and upload the file right
> away on the
> form submit. Then you can access the temp dir and the filename and do a
> second cfhttp post to put the file someplace else, if need be. If
> anyone can
> figure out how to do exactly what Daniel is describing - use a different
> scope for the filefield upload - please let us know.
>
> NAT
>
> -----Original Message-----
> From: Daniel Schmid [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 20, 2001 3:22 AM
> To: Fusebox
> Subject: image upload with cffile
>
>
>
> I run into some problems with the fileupload and the variable scope of
> <cffile>
>
> seems that <cffile> requieres a form variable (like form.image) and does
> not recognise attributes.image.
>
>
> I tried to change scope:
>
> <cfset form.image=attributes.image> with no succes.
>
> any help on this newbie question appreciated.
>
> Ananda
> Z�rich
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists