upload handler written in Ruby using Sinatra