--- title: File.fileName slug: Web/API/File/fileName tags: - DOM - Files translation_of: Web/API/File/fileName ---
{{APIRef("File API")}}{{non-standard_header}}
{{deprecated_header(7.0)}}
Returns the name of the file. For security reasons the path is excluded from this property.
var name = instanceOfFile.fileName
A string
Not part of any specification.