---
title: File
summary: Provides information about files and allows JavaScript in a web page to access their content.
url: https://www.fastly.com/documentation/reference/compute/sdks/javascript/js-compute/globals/interface.File/
---

**Kind:** Interface  
**Module:** [globals](https://www.fastly.com/documentation/reference/compute/sdks/javascript/js-compute/globals/)  
**Package:** @fastly/js-compute 4.0.1  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L1278

Extends `Blob`.

Provides information about files and allows JavaScript in a web page to access their content.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/File)

## Constructor

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L1289

```javascript
new File(fileBits: Array<BlobPart>, fileName: string, options?: FilePropertyBag)
```

**Parameters**

- `fileBits`: `Array<BlobPart>`
- `fileName`: `string`
- `options`: `FilePropertyBag` (optional)

## Properties

### lastModified

**Type:** `number`  
**Flags:** read-only  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L1280

[MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified)

### name

**Type:** `string`  
**Flags:** read-only  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L1282

[MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name)

### webkitRelativePath

**Type:** `string`  
**Flags:** read-only  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L1284

[MDN Reference](https://developer.mozilla.org/docs/Web/API/File/webkitRelativePath)
