Properties
A boolean indicating whether to check for MacBinary files.
Access: Read/Write
Default: True
Notes: Internet Explorer for the Macintosh encodes some files in
MacBinary format. This causes files to appear to be "corrupt" because they
contain the MacBinary header, the data fork and the resource fork. The default is to
only write the data fork to the upload file so that the file can be used by other
applications. If you do need to preserve the MacBinary format you should specify
False. You may want to still extract only the data fork using the Archive object.
Example: The following example shows how to set the CheckMacBinary
property:
Post.CheckMacBinary = False
See Also: Archive object
Long value that specifies the client side code page. Setting this
preserves the code page for form values and file names processed by the Post
object.
Access: Read/Write
Default: 0 (Server Code Page)
Example: The following example shows how to set the code
page.
Set Post = Server.CreateObject("File.Transfer.Post")
Post.CodePage = Session.CodePage
A Directory object that will be used to
hold all attached files associated with the post object.
Access: Read/Write
Default: None
Notes: This property is automatically initialized using the Path
parameter of the Upload method. However, if you do
not call Upload with a Path parameter before accessing the FormInputs
collection, the Directory property must be set to a valid Directory object that references
an existing directory. The directory does not need to be URL accessible
through a virtual directory mapping.
Example: The following example shows how to initialize the Directory
property:
Set Dir = Server.CreateObject("File.Transfer.Directory")
Set Post = Server.CreateObject("File.Transfer.Post")
Dir.CreateTemp "C:\TEMP"
Set Post.Directory = Dir
See Also: Directory object, Post.Upload method
Long value restricting the size in bytes of any one attached file. An error
occurs if this value is exceeded. Setting this value to a negative number allows
unlimited size.
Access: Read/Write
Default: -1 (unlimited)
Notes: This property is useful for limiting how large of a file a
client can upload to the system in order to prevent overuse of disk resources. If you are
uploading multiple files, refer to the MaxTotalFileSize
property for information on how to set a combined limit for all of the files.
Example: The following example shows how to limit the size of an
uploaded file to 100000 bytes.
Set Post = Server.CreateObject("File.Transfer.Post")
Post.MaxFileSize = 100000
See Also: Post.MaxTotalFileSize
property
Long value restricting the total size in bytes of all attached files. An error
occurs if this value is exceeded. Setting this value to a negative number allows
unlimited size.
Access: Read/Write
Default: -1 (unlimited)
Notes: This property is useful for limiting how much file data a
client can upload to the system in a single request in order to prevent overuse of disk
resources. You can also limit the size of a single file through use of the MaxFileSize property.
Example: The following example shows how to limit the combined size of
all uploaded files to one million bytes.
Set Post = Server.CreateObject("File.Transfer.Post")
Post.MaxTotalFileSize = 1000000
See Also: Post.MaxFileSize property
|