Posts

Showing posts from January, 2015

How to Restrict users from Uploading and Downloading Certain File Types

If a customer wishes to restrict the types of files (by file-name extension) that can be downloaded by an end-user, an example of how to do so may be found in the PeopleTools Test Utilities demo application ("PeopleTools->Utilities->Debug->PeopleTools Test Utilities"). Below Sample PeopleCode uses the "JSP" file extension, something similar may be done to restrict other file-types or to specify a list of permissible file-name extensions rather than a list of impermissible file-name extensions. First, implement something like the user-defined PeopleCode function, IsLegalAttachmentType, as it is defined in the "FILE_ATTACH_WRK . ATTACHUTIL . FieldChange" Record PeopleCode program:     Function IsLegalAttachmentType(&str_AttachFileName As string) Returns boolean;         rem Create array of illegal file-types (use uppercase only!);         Local array of string &IllegalTypesArray = CreateArray(".JSP");         rem Clean u