Eric is absolutely right, you are losing the resource fork of your mac binaries when 
you upload them.

(If you don't know, on a Mac, the binary file has to parts, the data, and the 
association with an application (or resource) that created the file.  This is done so 
that Mac file names don't need an extension)

Most server systems (except Mac of course) don't know how to handle a resource fork, 
so they drop it.  The standard Mac work around is to convert the binary file to a text 
format called binhex (.hqx filename extension) upload the .hqx file to the server and 
then reconvert it back once downloaded to a Mac that knows what to do with the 
resource fork information.

This process can be automated with apple script if you like,  but, if you ever want 
another machead to help you diagnose problems, stick to this layout, that way they 
know what you are doing.


Rance Hall
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.

-----Original Message-----
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002 8:46 AM
To: Shane McBride
Subject: Re: [PHP] MAC file upload

On Saturday, April 6, 2002, at 11:44  AM, Shane McBride wrote:

> Hello,
> I am able to upload and download Macintosh files but they seem to lose 
> their
> MIME type or extensions. I'm not sure what it is. I'm not a Mac dude.
> When you download the file It loses the file association. It's for a 
> company
> I do work for that uses a lot of .ai and .psd files.
> Any ideas on this?

You're possibly losing the resource fork of the files you are uploading, 
because the server is not an HFS+ filesystem.  To the best of my 
knowledge there is nothing you can do about this via PHP, but there are 
probably tricks (like AppleScript) that you could use as a workaround, 
such as encoding the files in some transport-friendly format before 
uploading and decoding them upon download.



Erik Price
Web Developer Temp
Media Lab, H.H. Brown

PHP General Mailing List (
To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to