Metadata-Version: 2.4
Name: ory-upserver
Version: 1.0.0
Summary: Simple UPload Server
Project-URL: Homepage, https://github.com/DoyunShin/UPServer
Project-URL: Source, https://github.com/DoyunShin/UPServer
Project-URL: Issues, https://github.com/DoyunShin/UPServer/issues
Author: DoyunShin
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: fastapi,fileserver,self-hosted,upload
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Requires-Python: >=3.11
Requires-Dist: fastapi>=0.110
Requires-Dist: google-api-python-client
Requires-Dist: google-auth-httplib2
Requires-Dist: google-auth-oauthlib
Requires-Dist: prompt-toolkit
Requires-Dist: uvicorn[standard]>=0.27
Description-Content-Type: text/markdown

# ory-upserver

Simple upload server with a FastAPI backend and a bundled SvelteKit frontend.
The wheel ships the prebuilt SPA, so a single `pip install` is enough to run a
working share-link service usable from curl, browsers, or scripts.

Source, design notes, Docker setup, and the full repository live at
<https://github.com/DoyunShin/UPServer>.

## Install

```bash
pip install ory-upserver
```

## Configure

A starter config is bundled at `<site-packages>/oryups/config.example.json`.
Copy it somewhere writable, edit `host.domain`, `local.root`, and (optionally)
`general.*` for branding, then launch:

```bash
ups --config /path/to/config.json
```

`--host` and `--port` override the values from the config.

## HTTP cheat sheet

| Method | Path                              | Purpose                                                |
| ------ | --------------------------------- | ------------------------------------------------------ |
| GET    | `/`                               | SPA upload page                                        |
| GET    | `/api/info`                       | Branding / footer info consumed by the SPA             |
| PUT    | `/{filename}`                     | Upload — response: share URL, `X-Owner-Key` header     |
| GET    | `/{fileid}/{filename}`            | Browser → SPA detail page; curl → direct download      |
| GET    | `/get/{fileid}/{filename}`        | Forced direct download                                 |
| GET    | `/api/v1/{fileid}/{filename}`     | Public metadata (owner key never included)             |
| DELETE | `/{fileid}/{filename}`            | Owner-initiated deletion (requires `X-Owner-Key`)      |

## License

Apache-2.0. See `LICENSE` (bundled with the wheel) for the full text.
