---
title: originalFilename
framework: photos
role: symbol
role_heading: Instance Property
path: photos/phassetresourcecreationoptions/originalfilename
---

# originalFilename

The filename for the asset resource being created.

## Declaration

```swift
var originalFilename: String? { get set }
```

## Discussion

Discussion You can use this property to track the original name of the file from which you import an asset resource even if you use the addResource(with:data:options:) method to create a resource from data instead of from a file. After creating the asset, this information is available in the originalFilename property of the corresponding PHAssetResource object. If you do not specify a value for this property and are using the addResource(with:fileURL:options:) method to create a resource, Photos infers the filename from that method’s fileURL parameter. Otherwise, Photos automatically generates a filename.

## See Also

### Describing a New Asset Resource

- [uniformTypeIdentifier](photos/phassetresourcecreationoptions/uniformtypeidentifier.md)
- [contentType](photos/phassetresourcecreationoptions/contenttype.md)
