---
title: Building a resumable upload server with SwiftNIO
framework: foundation
role: sampleCode
role_heading: Sample Code
path: foundation/building-a-resumable-upload-server-with-swiftnio
---

# Building a resumable upload server with SwiftNIO

Support HTTP resumable upload protocol in SwiftNIO by translating resumable uploads to regular uploads.

## Overview

Overview note: This sample code project is associated with WWDC23 session 10006: Build robust and resumable file transfers. Configure the sample code project Before you run the sample code project: In the Package.swift file of an existing HTTP server project, add .package(path: "/path/to/swift-nio-resumable-upload") as one of the dependencies. Import NIOResumableUpload in your SwiftNIO bootstrapping code. Create an upload context: let uploadContext = HTTPResumableUploadContext(origin: "https://example.com"). Wrap your HTTP server channel handler within HTTPResumableUploadHandler.

## See Also

### Uploading

- [Uploading data to a website](foundation/uploading-data-to-a-website.md)
- [Uploading streams of data](foundation/uploading-streams-of-data.md)
- [Pausing and resuming uploads](foundation/pausing-and-resuming-uploads.md)
