Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kejinlu committed Jul 22, 2023
1 parent 184cb5a commit a750a12
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 3 deletions.
58 changes: 56 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,61 @@
<picture>
<img src="https://raw.githubusercontent.com/kejinlu/SwiftyUploader/72fffe1c9d5363d55bf6361c206fdf24e5e4a73c/logo.svg" alt="SwiftyUploader logo" height="70">
<img src="https://raw.githubusercontent.com/kejinlu/SwiftyUploader/main/assets/logo.svg" alt="SwiftyUploader logo" height="70">
</picture>

---

<p align="center">
English | <a href="README.zh_CN.md">中文<a/>
</p>

# Overview
SwiftyUploader, a file upload web server based on SwiftNIO.
SwiftyUploader is a file upload server for iOS platform implemented based on SwiftNIO. If your iOS App needs to upload files from a computer or another phone to your App, you can use this library to quickly implement this feature. The Web page part of SwiftyUploader uses the code from [GCDWebUploader](https://github.com/swisspol/GCDWebServer/tree/master/GCDWebUploader/GCDWebUploader.bundle/Contents/Resources).

# Usage

## Requirements

- iOS 14.0+
- Xcode 14.3
- Swift 5.8

## Integration
You can use The Swift Package Manager for integration. Or you can enter `https://github.com/kejinlu/SwiftyUploader.git` in the dependency window in Xcode to add dependencies, or directly use local dependencies for testing.

```swift
// swift-tools-version:5.8
import PackageDescription

let package = Package(
name: "YOUR_PROJECT_NAME",
dependencies: [
.package(url: "https://github.com/kejinlu/SwiftyUploader.git", from: "1.0.0"),
]
)
```
Then run `swift build` whenever you get prepared.

## Code

```swift
let uploader = SwiftyUploader()
uploader.run()
```

If you need web page support for international languages, you need to add the following settings in the app's info.plist

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
</dict>
</plist>
```

<picture>
<img src="https://raw.githubusercontent.com/kejinlu/SwiftyUploader/main/assets/webui1.png" alt="SwiftyUploader logo" width="70%">
</picture>

2 changes: 1 addition & 1 deletion README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SwiftyUploader的Web页面部分使用了 [GCDWebUploader](https://github.com/sw
- Swift 5.8

## 集成
你可以使用 [The Swift Package Manager](https://swift.org/package-manager) 进行集成,如果仅仅测试的可以直接使用本地依赖的方式进行测试
你可以使用 [The Swift Package Manager](https://swift.org/package-manager) 进行集成,如果仅仅测试的可以在 Xcode 中添加依赖的窗口中输入 `https://github.com/kejinlu/SwiftyUploader.git` 添加依赖,或者直接使用本地依赖的方式进行测试。

```swift
// swift-tools-version:5.8
Expand Down

0 comments on commit a750a12

Please sign in to comment.