content type header for .ai

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Warhorse
    New Member
    • Aug 2006
    • 3

    content type header for .ai

    Hey all! :)

    I am currently working on a form to allow people to submit images via a form to an email address.

    I want to make the form be selective in the file types it will accept, but I seem to be stumbling on finding the right content type for one of the file types.

    I was hoping that someone could clue me in to what it might be. I should prolly note that I didn't write this code (my brother did) and I don't know a terrible lot about PHP, but I am trying to slowly learn and edit things myself :)

    Here is the code as I have it now: (there are two other lines, but to keep this short, I will just post one!)

    if( !($file1att_typ e == "applicatio n/postscript" || $file1att_type == "applicatio n/octet-stream" || $file1att_type == "image/tiff" || $file1att_type == "image/jpeg" || $file1att_type == "image/eps" || $file1att_type == "image/ai" || $file1att_type == "image/photoshop" || $file1att_type == "") ) {
    header("Locatio n: spdproblem.html ");
    exit;

    The file type I can't seem to get to work is Illustrator (.ai) which I have tried just ai and illustrator.

    Any help would be appreciated! Thanks :)
  • DenverS
    New Member
    • Jul 2007
    • 1

    #2
    try...
    header('Content-type: image/ai');
    I'm not sure if this is correct syntax... but "image/ai" seems to work for me at least.

    Denver

    Comment

    • mwasif
      Recognized Expert Contributor
      • Jul 2006
      • 802

      #3
      Use mime_content_ty pe() to determine the exact mime type.

      Comment

      Working...