Serve uploaded files as attachments (fixes #972)