From http://peoplesoft.ittoolbox.com/groups/technical-functional/peopletools-l/to-check-file-before-uploading-in-add-attachment-function-5288715?reftrk=no&trdref=4461696c79496e646578