Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v2.3.8) is shown here.
These similar methods exist in v3.2.13:
original_filename()
public
Take the basename of the upload’s original filename. This handles the
full Windows paths given by Internet Explorer (and perhaps other broken
user agents) without affecting those which give the lone filename. The
Windows regexp is adapted from Perl’s File::Basename.
Show source
def original_filename
unless defined? @original_filename
@original_filename =
unless original_path.blank?
if original_path =~ /^(?:.*[:\\\/])?(.*)/m
$1
else
File.basename original_path
end
end
end
@original_filename
end