---
title: contentLength
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avassetresourceloadingcontentinformationrequest/contentlength
---

# contentLength

The length, in bytes, of the requested resource.

## Declaration

```swift
var contentLength: Int64 { get set }
```

## Discussion

Discussion Before finishing loading an AVAssetResourceLoadingRequest instance, if its contentInformationRequest property is not nil, set the value of the contentLength property to the number of bytes contained by the requested resource.

## See Also

### Configuring content information

- [allowedContentTypes](avfoundation/avassetresourceloadingcontentinformationrequest/allowedcontenttypes.md)
- [contentType](avfoundation/avassetresourceloadingcontentinformationrequest/contenttype.md)
- [isByteRangeAccessSupported](avfoundation/avassetresourceloadingcontentinformationrequest/isbyterangeaccesssupported.md)
- [renewalDate](avfoundation/avassetresourceloadingcontentinformationrequest/renewaldate.md)
- [isEntireLengthAvailableOnDemand](avfoundation/avassetresourceloadingcontentinformationrequest/isentirelengthavailableondemand.md)
