Class for generate the random file from the attachments