The file could not be loaded. Reason: The file extension does not match its underlying type.

Certified Associate Developer
Hi! 
I'm working on version 24.3 with Spanish as the primary language, and I've added a document upload component (a!fileUploadField) to an interface with validation to receive only an XLSX document. I used a file originally with an .xlsx extension and it validates well, but if I manually change the extension to .pdf so it converts, for example, and then upload it, I get an error that I didn't capture in my validation: "File could not be uploaded. Reason: The file extension does not match its underlying file type."
It doesn't actually upload the document, and the error persists even without the attached document. Or if I upload another correct document, I have to refresh the entire page for it to stop appearing.
Is there a way to bypass this validation and just leave the one I have manually, or is there a way to update the validation when a new document is uploaded?


In this part of code, local!excel is not a refresh variable, is just:

localVariables(
local!excel,
...
)


  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to Shubham Aware

    There's a longstanding and known bug where, for instance, if a user tries to upload a document that's actually empty (which Appian disallows), that then even after they clear that upload and try uploading a valid file, the error message still (incorrectly) persists.  It sounds like, if what Eleeeeeeeeena is saying here is true, a similar (incorrect) behavior might be persisting on the "document type mismatch" error, which I haven't confirmed (or tested) for myself, but would not surprise me whatsoever.