<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHAssetResourceCreationOptions/originalFilename",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHAssetResourceCreationOptions(py)originalFilename"
  },
  "title" : "originalFilename"
}
-->

# originalFilename

The filename for the asset resource being created.

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

## 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:)`](/documentation/Photos/PHAssetCreationRequest/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`](/documentation/Photos/PHAssetResource/originalFilename) property of the corresponding [`PHAssetResource`](/documentation/Photos/PHAssetResource) object.

If you do not specify a value for this property and are using the [`addResource(with:fileURL:options:)`](/documentation/Photos/PHAssetCreationRequest/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)