Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cixtor/fileupload
Command line tool to upload one or more files to a local or remote disk over HTTP
https://github.com/cixtor/fileupload
Last synced: 10 days ago
JSON representation
Command line tool to upload one or more files to a local or remote disk over HTTP
- Host: GitHub
- URL: https://github.com/cixtor/fileupload
- Owner: cixtor
- License: mit
- Created: 2022-12-11T22:03:52.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T22:04:17.000Z (about 2 years ago)
- Last Synced: 2024-06-20T15:42:31.248Z (6 months ago)
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# File Upload [![GoReport](https://goreportcard.com/badge/github.com/cixtor/fileupload)](https://goreportcard.com/report/github.com/cixtor/fileupload) [![GoDoc](https://godoc.org/github.com/cixtor/fileupload?status.svg)](https://godoc.org/github.com/cixtor/fileupload)
> Uploading refers to transmitting data from one computer system to another through means of a network.
>
> Uploading directly contrasts with downloading, where data is received over a network.
>
> — https://en.wikipedia.org/wiki/Upload## Installation
```
go get -u github.com/cixtor/fileupload
```## Usage
Run `fileupload` to start a file server in the current working directory, listening on a random ephemeral port number. The web server returns a web page with a form to allow you, or anyone in your local network, to upload one or more files at once to the machine running the program. Then, you can leverage additional tools like [ngrok](https://ngrok.com) to allow users outside your local network to access the web page and offer them an easy way to transfer one or more files to you without the risks that public file transfer services pose.
```
$ fileupload
2021/08/22 13:50:53 localhost:3000 [::1]:51483 "GET / HTTP/1.1" 200 420 "-" 1.571861ms
2021/08/22 13:51:20 localhost:3000 [::1]:51483 "POST /upload HTTP/1.1" 302 0 "-" 983.471µs
2021/08/22 13:51:20 localhost:3000 [::1]:51483 "GET /?success=true HTTP/1.1" 200 420 "-" 131.556µs
^C
Server stopped
```Use option `-m` to control the maximum amount of bytes per file the server will allow users to upload, default is 20 MiB. Use option `-mp` to control the maximum (accumulated) amount of bytes to hold in memory before all files are uploaded, default is 200 MiB.