Remove code duplication, and allow unit tests (which #include both).
Attach a file by drag & drop or click to upload