fineuploader-go-server
fineuploader-go-server copied to clipboard
A Golang upload server for the fineuploader.com library
Go (a.k.a. Golang) Server-Side Example for the Widen Fine Uploader Javascript Library
This repository contains a Golang server-side example for users of Widen's Fine Uploader javascript library.
This server supports
Requirements
Go 1.6.1 (should work with previous versions with minor tweaks) No additional dependencies
Getting Started
Server installation
Run go get
pointing to the repository,
$ go get github.com/FineUploader/fineuploader-go-server
Compile and install
$ cd $GOPATH/src/github.com/FineUploader/fineuploader-go-server
$ go install
Run the server
$ $GOPATH/bin/fineuploader-go-server
Server start up flags
You can configure the server on start up with the below flags,
Flag | Default value | Description |
---|---|---|
p | 8080 | Listening port |
d | uploads | Root upload directory |
Example:
$ $GOPATH/bin/fineuploader-go-server -p 9000 -d myuploaddir
Server endpoints
Method | Endpoint | Usage |
---|---|---|
POST | /upload | Upload file end point. Will create <root_upload_directory>/qquuid directory and store the received file inside. Refer to request.endpoint |
DELETE | /upload | Deletes the uploaded file based on the qquuid parameter. Refer to deleteFile.endpoint |
POST | /chunksdone | Builds original file based on received chunks for the received qquuid parameter. Refer to chunking.success.endpoint |
Fine Uploader library
Go to the Download section of the Fine Uploader website for instructions on how to get the library.
Go to the Demos section for Fine Uploader configuration examples.
License
This project is licensed under the terms of the MIT license.