Results 1 to 6 of 6

Thread: filter file types

  1. #1

    Thread Starter
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    filter file types

    hey im using <input type="file"> in a form. is it possible to have it so that the only filers visible are *.swf files?

    thanks

  2. #2
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    no, you have to figure out what they uploaded with serverside language.

  3. #3
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Accept is supposed to do that isn't it? I don't know whether it works on any browsers though. This is what the HTML 4 spec said:

    accept = content-type-list
    This attribute specifies a comma-separated list of content types that a server processing this form will handle correctly. User agents may use this information to filter out non-conforming files when prompting a user to select files to be sent to the server (cf. the INPUT element when type="file").

  4. #4
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    well I've never seen it used so it must be new. try it out and see

  5. #5
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    I couldn't get it to work, unless I was doing something wrong. where did you read that?

  6. #6
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    I don't think any browsers do support it, but it's not new (HTML 4 is over 5 years old isn't it?). And I read it from the official HTML 4 spec on the W3C site. You want me to find the URI for you?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width