Skip to content

Instantly share code, notes, and snippets.

View phss's full-sized avatar

Paulo Schneider phss

  • Lisbon, Portugal
View GitHub Profile
require 'rubygems'
require 'sinatra'
require 'fileutils'
# upload with:
# curl -v -F "data=@/path/to/filename" http://localhost:4567/user/filename
post '/:name/:filename' do
userdir = File.join("files", params[:name])