--- 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)}}

Summary

Returns the name of the file. For security reasons the path is excluded from this property.

This property is deprecated. Use {{domxref("File.name")}} instead.

Syntax

var name = instanceOfFile.fileName

Value

A string

Specification

Not part of any specification.

See also