Update README.md

This commit is contained in:
Pierre-Olivier Latour 2014-04-07 23:27:44 -07:00 committed by Pierre-Olivier Latour
parent efb1f9f4eb
commit 715d985475

View File

@ -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
========================