Dear All,I’m using a File Upload control on a web form to attach files. I need to have a control over the files which will be attached to the system. Attachment should not exceed the size of 300kb. How can i do this. PLS help me. Thanks in advance
Subject: File upload control on web and size limitation
I think you can evaluate size of attatchments in script, and put this script in the event “Querysave” of form. When size is over the limitation, document will fail to be saved.
Subject: RE: File upload control on web and size limitation
You can use NotesEmbeddedObject.FileSize property, example:
This script gets the size of the “City picture” embedded object in the Body item of a document, and puts it into sizeInBytes. For example, FileSize might return 582.
Dim doc As NotesDocument
Dim rtitem As Variant
Dim object As NotesEmbeddedObject
Dim sizeInBytes As Long
'…set value of doc…
Set rtitem = doc.GetFirstItem( “Body” )
If ( rtitem.Type = RICHTEXT ) Then
Set object = rtitem.GetEmbeddedObject( “City picture” )
Subject: RE: File upload control on web and size limitation
You need to use that code in a WebQuerySave agent. To prohibit the saving of the document in a WQS agent, you create the field SaveOptions with the value “0”.