mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2026-05-31 00:00:10 +08:00
Update README.md
This commit is contained in:
committed by
Pierre-Olivier Latour
parent
efb1f9f4eb
commit
715d985475
@@ -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.
|
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
|
Serving a Static Website
|
||||||
========================
|
========================
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user