Online Product Info
CompressAttachments Property

Description
The CompressUploadedFiles property indicates whether files and auto response email attachments should be compressed into a single zip file.

Compressing attachments allows you to save bandwidth, reduce overall attachment size, and combine several files into a single attachment.

Default Value
If the CompressUploadedFiles is not specified, it will default to False (files will not be compressed.)

The zip file will be given a unique name based on the current date and time (down to the millisecond.) This allows you to know precisely when the file was uploaded and significantly reduces the chances of overwriting files.

Usage
See Listing A for an example of the CompressUploadedFiles property in the Auto DB control tag.

<cc1:AutoDB id="AutoDB1" runat="server" CompressUploadedFiles="True" UploadDir="Uploads"> </cc1:AutoDB>
Listing A

Note: ASP.NET Auto DB will automatically detect file fields in your form and add attachments. To accept attachments, your form must have one or more file fields with the runat property set to "server" like so:

<INPUT type="file" id="firstFile" runat="server" NAME="firstFile">

In addition, your form tag must contain encType="multipart/form-data" as shown below:

<FORM name="frmLeadentry" encType="multipart/form-data" method="post" runat="server">

Remember: You must specify a UploadDir with read and write access to process incoming files or create zip files.

Related Properties

UploadDir, CompressionLevel

 

© copyright 2004 360 IMPACT. All rights reserved.