Domino Code Fragment
Code Name* Prevent large attachments | Date* 09/13/2002 | Source (or email address if you prefer)* k1blankenship@charter.net IP address:.24.98.18.133 | |
Description* Since I couldn't prevent a person from attaching a large file before the document is saved, I ended up putting this code into the PostSave event. I say, let the person save the doc, then interrogate the data, and if the file is too large, oh well, see ya..... I give them a message. I found that I have to close the UI instead of allowing users to stay in edit mode, as there's some residual pointer left over. Sometimes the pointer or image shows up as if there is an attachment, but errs out when you click on it. This also takes into account multiple attachments, and removes only the ones that are over the limit. Enjoy, Keith Blankenship | Type* LotusScript | Categories* OLE/ActiveX Integration, User Interface (Notes) |
Implementation: Modify code | Required Client: (none) | Server: (none) |
Limitations: IF some yoyo loads up a really big attachment, it'll get saved, only to have it deleted. If they do it enough it could fragment the database, not to speak of slowing things down. | Comments: Hope this helps. PS. you'll have to the messagebox statement back together? |