We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New EE2.x Plugin: Only get filename from file-field

Development and Programming

esset's avatar
esset
191 posts
16 years ago
esset's avatar esset

I thought maybe someone wanted to use this little plugin I’ve written.

What it does is that it sends you back the name of the file that’s been uploaded using the default custom-file-field in EE2.x.

Wrap your custom file field in the {exp:get_filename}{/exp:get_filename} tags and the plugin will return your filename.

Example: Uploaded file is: Image.jpg

{exp:get_filename}{custom_file_field_name}{/exp:get_filename}

will return “Image”.

Download: http://www.naboovalley.com/downloads/get_filename.zip

Note: It will NOT work with filenames that have multiple “.” characters in them. (ie. “my.file.is.so.cool.jpg”)

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.