Prevent inserting a same attachment twice in a reply
Add some random characters to uploaded files

This is to prevent direct access by guessing its name