当前位置: 首页 > 工具软件 > GCDWebServer > 使用案例 >

GCDWebServer WebUploader Swift 用法

益银龙
2023-12-01

太强大了,2句代码完事。

var gcdWebUploader: GCDWebUploader!
    
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        self.gcdWebUploader = GCDWebUploader(uploadDirectory: NSHomeDirectory() + "/Documents/")
        self.gcdWebUploader.start(withPort: 8097, bonjourName: "Web server")
}
 类似资料: