-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Becky,
The "makeunique" attribute for CFFILE does just that. If the filename
already exists CF will generate a random filename instead.
You need to use the 'nameconflict="OVERWRITE"' attribute instead.
Be VERY carefull with the OVERWRITE attribute as it can be dangerous.
Testing ... testing ... testing is required, preferably with the
MAKEUNIQUE attribute first. When you are certain the results are what
you require then test your code with the OVERWRITE attribute.
If you can be certain that there should be no filename conflict (for
example, a file specific to a user when there can be no duplicate
users) then the overwrite should be safe.
Cheers!
Peter Tilbrook
Chief Web Developer
Lunar Power Internet Technologies
Unit 1, 26-28 Winchcombe Court
Mitchell, ACT, 2911
AUSTRALIA
Phone: (02) 6242 6666
Mobile: 0401 973 415
Fax: (02) 6242 6655
Email: [EMAIL PROTECTED]
Web: http://www.lunarpower.com.au
- -----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jones,
Becky
Sent: Friday, 6 July 2001 5:00 AM
To: CF-Talk
Subject: cffile
when i use cffile to upload a file to a directory on my webserver, it
seems
to rename the file when i try to insert that same file into my
database.
so if i upload say text.html it shows up in my database as a .tmp
file.
what am i doing wrong?
<cffile action="UPLOAD" filefield="Files"
destination="c:\inetpub\wwwroot\admin\files"
nameconflict="MAKEUNIQUE">
my insert statment is just
insert into tblarticles
(files)
values
('#GetFileFromPath(form.Files)#')
-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Edition 6.0.2
iQA/AwUBO0S2HkUmflCFE8qcEQJNbACfRkToHIP4uJNw8ZVXMEaOLAjuVWMAoM5p
tda96074X248d0FY/upXv3vx
=WNsy
-----END PGP SIGNATURE-----
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists