Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

capotej/uploadd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uploadd

Minimal file upload daemon using Rainbows

Rails plugin here: paperclip_uploadd

Installation

gem install rainbows
gem install rack-contrib
git clone git:https://github.com/capotej/uploadd.git

Configuring

Edit config.ru and change SECRET to something secure, like the word "password"

Running

cd /path/to/uploadd
nohup rainbows &

That's it! Now you should have a scalable upload server running on :8080

Usage

Here's an example of how to use it (requires httpclient gem):

HTTPClient.post 'https://localhost:8080/up', { :file => File.new('/path/to/file.jpg'), :filename => 'users/avatar/12, :secret => "redrum" }

But is it fast?

Video of the logs with 10 workers uploading images from another server

Notes

Uploadd was written to be as simple as possible so it doesn't check for duplicates, it just overwrites. You can feed the filename param a deep directory structure and it'll create all the directories for you below the UPLOAD_DIR in config.ru

Rails plugin

There is a Rails plugin that extends Paperclip to use Uploadd as a backend as opposed to S3 or the local file system, check out paperclip_uploadd.

About

Minimal upload server powered by Rainbows

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages