From 715d9854751a79692300f6999d16e1ffce8765a3 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Latour Date: Mon, 7 Apr 2014 23:27:44 -0700 Subject: [PATCH] Update README.md --- README.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cfc3b28..77880d3 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,8 @@ int main(int argc, const char* argv[]) { } ``` -Adding File Upload to iOS Apps -============================== +Web Based Uploads in iOS Apps +============================= GCDWebUploader is a subclass of GCDWebServer that provides a ready-to-use HTML 5 file uploader & downloader. This lets users upload, download and delete files from a directory inside your iOS app's sandbox using a clean user interface in their web browser. @@ -83,6 +83,25 @@ Simply instantiate and run a GCDWebUploader instance then visit http://{YOUR-IOS } ``` +WebDAV Server in iOS Apps +========================= + +GCDWebDAVServer is a subclass of GCDWebServer that provides a class 1 compliant [WebDAV](https://en.wikipedia.org/wiki/WebDAV) server. This lets users upload, download and delete files from a directory inside your iOS app's sandbox using any WebDAV client like [Transmit](https://panic.com/transmit/) (Mac), [ForkLift](http://binarynights.com/forklift/) (Mac) or [CyberDuck](http://cyberduck.io/) (Mac / Windows). + +Simply instantiate and run a GCDWebDAVServer instance then connect to http://{YOUR-IOS-DEVICE-IP-ADDRESS}/ using a WebDAV client: + +```objectivec +#import "GCDWebDAVServer.h" + +- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { + NSString* documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]; + GCDWebDAVServer* davServer = [[GCDWebDAVServer alloc] initWithUploadDirectory:documentsPath]; + [davServer start]; + NSLog(@"Visit %@ in your WebDAV client", davServer.serverURL); + return YES; +} +``` + Serving a Static Website ========================