I recently wrote about how to replace the “See attached file: ” string in an XPage with a link to the attachment. We enhanced the code to display an icon to make the output more like the user would expect it.
Everything worked fine until we implemented the code in one of our productive applications. The code itself works, but for some reason, the filenames that are stored in the $File items do not correspond the actual filenames.
Not sure, why this happens. I’ve tried to reproduce but are not able to. The only hint I found is a technote about a similar issue with iNotes.
Would be great if such issues get generally fixed and not just worked around as it obviously has been done for the XPages download control.
Basically the method is used to be able to have multiple attachments with the same filename. I have seen this on several occasions in Notes applications especially if it involves reattaching files.
But the filenames are different …
That is why is mentioned the reattach. I have seen this behaviour when you save the file, delete it from the document (save) and then reattach. Sometimes Notes seem to remember the filename and then use the internal MIME name. An example could be that you have an AV solution on your productive Domino Server that scans those attachments.
I don’t want to say that this the correct behaviour just that I have seen it before (although not in an XPages context).
Make a copy of the attachment in the Notes client and paste it. Delete the first attachment. Then your attachment gets the filename ATT… .
I doubt that the user did this on hundreds of documents and attachments.