Sinatra app to generate S3 policies and a jQuery plugin to use client-side