patch from Michael Glaesemann, additional changes by Neil Conway.
Attach a file by drag & drop or click to upload