---
title: PHAssetResourceUploadJob
framework: photos
role: symbol
role_heading: Class
path: photos/phassetresourceuploadjob
---

# PHAssetResourceUploadJob

An object that represents a request to upload an asset resource.

## Declaration

```swift
class PHAssetResourceUploadJob
```

## Overview

Overview Use within an application’s com.apple.photos.background-upload extension to request an upload of a PHAssetResource to a destination NSURLRequest. When the extension’s principal class receives a call to process() background uploads, it can create new PHAssetResourceUploadJob objects using PHAssetResourceUploadJobChangeRequest. The maximum number of jobs that can be in flight is limited to the jobLimit. To make space for new jobs, you must call PHAssetResourceUploadJobChangeRequest/fetchJobsWithAction:options: and retry/acknowledge them with PHAssetResourceUploadJobChangeRequest/acknowledge: or retry(destination:) respectively.

## Topics

### Fetching jobs

- [jobLimit](photos/phassetresourceuploadjob/joblimit.md)
- [fetchJobs(action:options:)](photos/phassetresourceuploadjob/fetchjobs(action:options:).md)
- [PHAssetResourceUploadJob.Action](photos/phassetresourceuploadjob/action.md)

### Inspecting a job

- [type](photos/phassetresourceuploadjob/type-swift.property.md)
- [PHAssetResourceUploadJob.Type](photos/phassetresourceuploadjob/type-swift.enum.md)
- [destination](photos/phassetresourceuploadjob/destination.md)
- [resource](photos/phassetresourceuploadjob/resource.md)
- [state](photos/phassetresourceuploadjob/state-swift.property.md)
- [PHAssetResourceUploadJob.State](photos/phassetresourceuploadjob/state-swift.enum.md)
- [error](photos/phassetresourceuploadjob/error.md)
- [responseHeaderFields](photos/phassetresourceuploadjob/responseheaderfields.md)

## Relationships

### Inherits From

- [PHObject](photos/phobject.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Background resource upload extensions

- [Uploading asset resources in the background](photokit/uploading-asset-resources-in-the-background.md)
- [PHBackgroundResourceUploadExtension](photos/phbackgroundresourceuploadextension.md)
- [PHAssetResourceUploadJobChangeRequest](photos/phassetresourceuploadjobchangerequest.md)
