Skip to content
/ mup Public

A micro file uploader written in Zig to easily share files over LAN

License

Notifications You must be signed in to change notification settings

dgv/mup

Repository files navigation

μploader - Micro Uploader

reference Zig reference Zig build License: MIT

mup

Rewritten of mup, 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 and zig-clap as dependencies and provide a statically linked binary.

Motivation

@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: size comparison

# 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

$ 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.

$ docker build -t mup .
$ docker run -p 5000:5000 -v $PWD/uploads:/uploads mup

Usage

$ mup --help
    -h, --help
            Display this help and exit.

    -s, --size <usize>
            Maximum upload size in MB.

    -p, --port <u16>
            Port to run the server on.

    -a, --addr <str>
            Address to run the server on.

    -d, --dir <str>
            Upload directory to serve files.

About

A micro file uploader written in Zig to easily share files over LAN

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published