added pdf to the acceptable file extensions
because the module doesn't check if the file already exist i've hacked it here so that it appends a 6 digit random number to the filename so that files of the same name will remain uniqu