Restricting Size of Attachments

C

cgarrab

I have created a form that contains both file attachment and picture
attachment capabilities. I can restrict the types of files permitted using
the control feature in the properties to .doc; .xls; .ppt., etc. Is there a
way to restrict the size of the files being attached to the form?
 
C

cgarrab

My apology, but I am still lost. The instructions read:

1. Open the Data Source pane
2. Double-click on field1 to bring up its properties
3. In Validation, add a new condition
4. Select Expression, type this expression in: string-length(.) > 136533
5. Enter the text to be displayed when the error condition occurs

I get lost on step 4. There are 3 pull downs.

I. If this condition is true "Field Name"
II. "Is equal to"
III. "Select field or group"

I can add the expression when I select "contains", but it doesn't seem to
work.

Thank you
 
A

Anuma(GGK Tech)

Hi,

Can you try it with following steps:

1. Double click on the attachment field node in the data source.
2. Navigate to “Validation†tab and click on add button.
3. Select “expression†in the first drop down.
4. Enter “string-length(.) * 6 div 8 div 1024 > 10†test in the second text
box.
5. Click on ok.

This field uses the following formula to limit the file size to 10KB.
There are roughly 6 bits per Base64 char. http://en.wikipedia.org/wiki/Base64

((string-length(.) * 6) div 8) div 1024 > 10
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top