Needs something that will browse users machine and permit the upload of a JPEG
Thanks in advance, -DV |
Part 1 - your form that allows users to browse files:
<form action="filename.cfm" method="post" enctype="multipart/form-data" name="uploadImage" id="uploadImage"> <input type="file" name="imageFileName" id="imageFileName"> <input type="submit" name="submit" id="submit" value="Upload"> </form> Part 2 - filename.cfm which processes the form: (remember to specify your destination path in application.cfm) <cffile action="UPLOAD" filefield="imageFileName" destination="#application.imagePath#" nameconflict="MAKEUNIQUE"> Rich :) |
Cheers Rich.
That will get me going. May need to introduce limitations on image size, but I doubt CF offers that kind of functionality. May have to look at some Java. -DV |
this is lifted from some old code - can't remember if cf_filesize is a custom tag or not though - worth a shot!
<cfif right(cffile.serverfile,3) eq "gif" or right(cffile.serverfile,3) eq "jpg"> <cf_imagesize file="#application.imagePath#\#cffile.serverfile#" > <cfif height gt 150> <cfset error = "The image height is too large"> <cfelseif width gt 600> <cfset error = "The image width is too large"> </cfif> <cfelse> <cfset error = "The file is not in an acceptable format"> </cfif> Rich :) |
Ah Rich you tease! Thats the exact kind of code I'm looking for, but that DOES look like a custom tag. CF only offer 3 tags for file management and that ain't one of them!
Any idea where I could get that tag from ? -DV |
Daz ... YHM
Steve |
Cheers
|
All times are GMT +1. The time now is 10:57 PM. |
© 2024 MH Sub I, LLC dba Internet Brands