Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itchio/zipserver
🎁 A microservice that extracts a .zip file and uploads individual entries
https://github.com/itchio/zipserver
Last synced: about 2 months ago
JSON representation
🎁 A microservice that extracts a .zip file and uploads individual entries
- Host: GitHub
- URL: https://github.com/itchio/zipserver
- Owner: itchio
- Created: 2013-11-24T00:26:11.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-06-14T17:39:39.000Z (7 months ago)
- Last Synced: 2024-06-19T03:12:43.179Z (7 months ago)
- Language: Go
- Homepage:
- Size: 1000 KB
- Stars: 10
- Watchers: 4
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![test](https://github.com/itchio/zipserver/actions/workflows/test.yml/badge.svg)](https://github.com/itchio/zipserver/actions/workflows/test.yml)
# zipserver
Zip server is an HTTP service that takes a key to a zip file on Google Cloud
storage, extracts it, then reuploads the individual files to a specified
prefix. It can restrict extraction of the zip file based on individual file
size, total file size, or number of files.## Usage
Install
```bash
go install github.com/itchio/zipserver@latestzipserver -help
```Create a config file:
`zipserver.json`:
```json
{
"PrivateKeyPath": "path/to/service/key.pem",
"ClientEmail": "[email protected]"
}
```More config settings can be found in `config.go`
Run:
```bash
$GOPATH/bin/zipserver
```Extract a zip file:
```bash
curl http://localhost:8090/extract?key=zips/my_file.zip&prefix=extracted
```## Slurping
You can tell the zip server to download a file from a URL. This can be used to
load a zip file you want to extract later.```bash
curl http://localhost:8090/slurp?key=myfile.zip&url=http://leafo.net/file.zip
```## GCS authentication and permissions
The key file in your config should be the PEM-encoded private key for a
service account which has permissions to view and create objects on your
chosen GCS bucket.The bucket needs correct access settings:
- Public access must be enabled, not prevented.
- Access control should be set to fine-grained ("legacy ACL"), not uniform.