Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dgv/mup
A micro file uploader written in Zig to easily share files over LAN
https://github.com/dgv/mup
download upload upload-file uploader zig ziglang
Last synced: 12 days ago
JSON representation
A micro file uploader written in Zig to easily share files over LAN
- Host: GitHub
- URL: https://github.com/dgv/mup
- Owner: dgv
- License: mit
- Created: 2024-08-30T22:47:51.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-11-15T01:58:41.000Z (about 2 months ago)
- Last Synced: 2024-12-18T02:53:22.849Z (14 days ago)
- Topics: download, upload, upload-file, uploader, zig, ziglang
- Language: Zig
- Homepage:
- Size: 68.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# μploader - Micro Uploader
[![reference Zig](https://img.shields.io/badge/0.13.0-orange?style=flat&logo=zig&label=Zig&color=%23eba742)](https://github.com/dgv/mup/blob/main/build.zig.zon)
[![reference Zig](https://img.shields.io/badge/deps%20-2-orange?color=%23eba742)](https://github.com/dgv/mup/blob/main/build.zig.zon)
[![build](https://github.com/dgv/mup/actions/workflows/build.yml/badge.svg)](https://github.com/dgv/mup/actions/workflows/build.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](https://opensource.org/licenses/MIT)![mup](https://github.com/dgv/mup/blob/main/mup.png)
Rewritten of [mup](https://github.com/aziis98), a simple file uploader that can be used to easily move and share files across the local network between devices with a web browser.
It only uses [httpz](https://github.com/karlseguin/http.zig) and [zig-clap](https://github.com/Hejsil/zig-clap) as dependencies and provide a statically linked binary.
### Motivation
[@aziis98](https://github.com/aziis98):
_Sometimes I want to move files between my pc and a device I do not own that has an old browser version (that generally means expired https certificates, oh and without any cables). When I try to search for a tool like this I always find random outdated projects that aren't easy to setup. So I made this tool that can be easily installed on all linux systems._[@dgv](https://github.com/dgv):
_size comparison_
```bash
# go binary striping symbol and debug info..tinygo?
$ go build -ldflags "-s -w"; du mup
16704 mup
...
# zig binary -65x
$ zig build --release=small; du zig-out/bin/mup
256 zig-out/bin/mup
```### Git
```bash
$ git clone https://github.com/dgv/mup
$ cd mup# Run the server
$ zig build run# Build the binary
$ zig build
```### Dockerfile
I provide this just to easily deploy on a local server. I **do not recomend to expose this publicly** on the web as there is no auth or password and there is no upload limit to the number of files and all files in the `Uploads/` folder are public by default for now.
```bash shell
$ docker build -t mup .
$ docker run -p 5000:5000 -v $PWD/uploads:/uploads mup
```## Usage
```bash
$ mup --help
-h, --help
Display this help and exit.-s, --size
Maximum upload size in MB.-p, --port
Port to run the server on.-a, --addr
Address to run the server on.-d, --dir
Upload directory to serve files.
```