Skip to main content
August 28, 2024
Question

fileupload validation not working as expected

  • August 28, 2024
  • 1 reply
  • 0 views

Hello,

I have the following validations on a file upload. When I upload a wrong extension for testing, it is giving me a completely different validation message than what I have in my code and I'm not sure where it's getting it from. Also, it looks like each time I upload a new file, the earlier validation message does not get replaced with the new one and I have no point of reference to see where this is happening, if anyone knows how to fix these two issues I'd really appreciate it.

Here is the code. For reference, the constant being used (cons!GF_FILE_EXTENSIONS_UTILITY_PACKAGE_ARTIFACTS) has an array of all valid extensions (pdf, jpg, png, etc.)

    1 reply

    stefanhelzle0001
    Brainy
    August 29, 2024

    File extensions can be blocked in the admin console.