Why does WebQuerySave sometimes run twice and duplicate my attachment with a filename like ATT*.ext where ext is the original extension?
Posted on 2008-06-16
I work for a bank and run Domino 8.01 on our servers. I am using the the Notes 6.5.6 designer client. I have a Domino application with a form on which there is an upload control. I find that sometimes when I upload a large file (>1 meg) the file gets duplicated with a new filename such as ATTnnnnn.ext where ext is nnnnn seems to be a random number and ext is the original extension of the file.
I have read in other forums that this can occur when a second file is attached to a document that has the same filename as another file already attached. But this would not be the case in my case. There were no files attached when I attached a new file called file3.txt, which was 1.5Meg of simple text, but it ended up attached to my document twice, one file with the original filename and one file with a filename like ATT12345.txt.
Also, WebQuerySave ran twice but I have no idea why or even how I could make this happen if I wanted to make it run twice. It certainly doesn't call itself or have any agent.run methods calls. I have it write to the log the contents of a field called FileAttachments which is a computed field with the formula @AttachmentNames. When it ran the first time, it listed only file3.txt but when WebQuerySave ran again it listed both that file and the new file with the filename like ATT12345.txt.
Another clue is that when I upload smaller files, which I have named file1.txt and file2.txt, which are both < 100K, it never duplicates them and WebQuerySave runs only once.
Does anyone know why this would happen and what I can do about it? I could delete any files starting with ATT but I am afraid that there may be other scenarios happening and I don't want to delete data my users might need, for instance, in case the original file did get deleted. Who knows if my users have experienced this but found the file attached as the other filename. Some users would just take this file, rename it and go on without reporting a problem to the help desk.
This is very bad because it is taking up a lot of disk space to have the biggest file attachments duplicated!