No javascript was required. I love the new CSS calc().
Attach a file by drag & drop or click to upload