find the extension of a file uploaded?

Posted on 2007-08-06
Last Modified: 2013-12-24
In coldfusion i need a statement which finds the image extension

<cfset uploadedImage = cffile.serverfile>   \\ logo.jpg
search the var uploadedImage give me the  .jpg bit at the end i.e <cfset myext = find (\.) list last

not sure how to do this, anyone?

Question by:pigmentarts
    LVL 39

    Accepted Solution


    There is a built in variable called "clientFileExt"

    you can reference it with  cffile.clientFileExt

     If you're using a pre-MX7 version of coldfusion you can use..


    LVL 39

    Expert Comment

    I meant to include the cffile scope..

    LVL 12

    Author Comment

    cool did not know that, perfect CF7 one works a treat. thank you :)

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
    Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
    The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be Log into your Hosting account. IPage will be used for demonstration : Locat…
    The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: : Click on Too…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now