---
title: "Save PDF files to your remote server on iOS"
canonical_url: "https://www.nutrient.io/guides/ios/save-a-document/to-remote-server/"
md_url: "https://www.nutrient.io/guides/ios/save-a-document/to-remote-server.md"
last_updated: "2026-05-25T18:42:17.779Z"
description: "Learn how to save and upload PDFs to your server on iOS with simple code examples using Nutrient and URLSession."
---

# Save and upload PDFs on iOS devices

Nutrient [automatically saves](https://www.nutrient.io/guides/ios/annotations/annotation-and-bookmark-saving-triggers.md) a modified file-based document to your device’s local storage. You can also [customize the autosaving behavior](https://www.nutrient.io/guides/ios/annotations/annotation-and-bookmark-saving-triggers.md#customize-autosaving) or [manually save](https://www.nutrient.io/guides/ios/annotations/annotation-and-bookmark-saving-triggers.md#manual-saving) the changes.

After the document is saved, you can upload the PDF file to your remote server using [`URLSession`](https://developer.apple.com/documentation/foundation/urlsession)’s [`uploadTask(with:fromFile:)`](https://developer.apple.com/documentation/foundation/urlsession/1411550-uploadtask) method. The example below shows how to manually save a PDF and upload it to your remote server:

```swift

let fileURL = Bundle.main.url(forResource: "Document", withExtension: "pdf")!
let document = Document(url: fileURL)

// Modify the document.
//...

// Manually save the document.
try? document.save()

// Upload the PDF file to your remote server using `URLSession`:
let session = URLSession.shared
let serverURL = URL(string: "http://127.0.0.1:12345")!
var request = URLRequest(url: serverURL)
request.httpMethod = "POST"
let task = session.uploadTask(with: request, fromFile: document.fileURL!)
task.resume()

```
---

## Related pages

- [Automatically save PDFs on iOS](/guides/ios/features/document-checkpointing.md)
- [Save PDF documents on iOS](/guides/ios/save-a-document.md)
- [Conflict resolution when saving PDFs on iOS](/guides/ios/features/conflict-resolution.md)
- [How to save PDFs on iOS](/guides/ios/save-a-document/save-as.md)
- [Incremental PDF saving on iOS](/guides/ios/faq/growing-pdf-file-size.md)
- [Save PDFs to local storage on iOS](/guides/ios/save-a-document/to-local-storage.md)
- [Save PDFs to a custom data provider on iOS](/guides/ios/save-a-document/to-custom-data-provider.md)
- [Save PDFs to Document Engine on iOS](/guides/ios/save-a-document/to-document-engine.md)

