If the upload is sent from a browser in MacBinary format, then both the resource and dataforks will be transmitted to the server.
The PreserveMacBinary property was added to version 3.3 of FileUp for flexibility when uploading files from a Mac. FileUp can preserve both the data and resource forks from a properly formatted MacBinary upload if the PreserveMacBinary property of the FileUp object is set to "true". The default setting of this property is false, meaning that FileUp will save only the data fork of the upload stream even if the resource fork is available. This property is only relevant when the upload is sent from the browser in MacBinary format. Note: FileUp does not provide MacBinary encoding or decoding functionality, it merely preserves the forks if they are sent by the browser.
This property needs to be set on the primary object before referencing any form elements.
Example:
<%
'--- Instantiate FileUp
Set upl = server.CreateObject("SoftArtisans.FileUp")
'--- Set PreserveMacBinary
upl.PreserveMacBinary = true
'--- Set other property
upl.Path = "c:\temp"
'---
'---
'--- rest of code
.
.
%>
For fine tuning, this property can be set on individual files. upl.form("File1").PreserveMacBinary can be changed or inherited from
upl.PreserveMacBinary before final save is called.
This is totally dependent on the Mac browser client behavior, and some browsers may not provide this functionality. If you are running Internet Explorer, we can provide the following suggestion: You can change the MacBinary settings using the IE Preferences. In the 'File Helpers' section there is a list of file types. If a particular file type is selected as 'Binary Data' and 'Macintosh File' then uploads of that type will always be in MacBinary format. |