Title | Under | Posted on |
---|---|---|
Component interface Error: no rows exist for the specified keys | PeopleSoft Technical | 03/15/2019 - 3:54am |
ADD 24 months starting from current month.(peoplesoft) | PeopleSoft Functional | 07/29/2018 - 8:44pm |
TRC values dropdown | PeopleSoft Technical | 04/04/2018 - 12:54am |
how to find missing sequence in GRID and print the mising sequence number while saving through peoplecode | PeopleSoft Technical | 09/11/2017 - 4:49am |
You can use FileType parameter for the function AddAttachment. But the FileType parameter is only a suggestion. Specifying it does not enforce specific file types. If you do not want specific file types (such as .exe or .bat) you must write PeopleCode to discern the name and file type of the attached file and delete it.
You may not be able to filter files by file type due to browser limitations. You may have to write your own PeopleCode to do this filtering before you call the browser.
When the end user views attachments using the ViewAttachment function, some browsers treat documents as HTML regardless of file extension, and thus execute embedded Java script. You may want to write a PeopleCode program to only allow specific file extensions to be viewed. Refer People Books Home > PeopleBooks > Enterprise PeopleTools 8.48 PeopleBook: PeopleCode Language Reference > PeopleCode Built-in Functions
If you want to restrict entirely a type of files like .exe or .bat, which I have done in some client's place is comment the web.xml file in $PS_HOME/webserv/domain/applications/peoplesoft/PORTAL/WEB-INF folder like the one below:
But, remember this will work for all functions including GetAttachment, PutAttachment. so take care while commenting this.
Best of luck.
just use the right() function to read the last 4 characters & place an if else condition.