(Done as separate patch from trunk as the code has diverged quite a bit.)
Attach a file by drag & drop or click to upload