Skip to main content
Inspiring
August 5, 2009
Question

cffile accept attribute and flv files

  • August 5, 2009
  • 2 replies
  • 1364 views

I'm trying to use the cffile upload action to upload only flv files. Within the "Accept" attribute I've added "video/x-flv". Within IIS (Win 2003) I've added the mime type mapping within the site properties. I've also restarted the server, but it still sees it as application/octet-stream when it throws the error. Any ideas?


    This topic has been closed for replies.

    2 replies

    Inspiring
    August 5, 2009

    Thanks, that really makes me lose all confidence in the accept attribute. I suppose I'll have to check based on the extension after upload. Doh.

    Inspiring
    August 5, 2009

    It is not a good idea to trust mime types anyway

    http://www.coldfusionjedi.com/index.cfm/2009/6/30/Are-you-aware-of-the-MIMEFile-Upload-Security-Issue

    Participating Frequently
    August 5, 2009

    When a file is uploaded the mime type of the file is set and sent by

    the browser not by the server. The mime type in IIS is used only when

    you request the flv file directly.

    I think you would have to add the mime type to every computer that

    uploads flv files (that's a fundamental limitation in HTTP and it's

    true regardless of the server side processing language you're using).

    Mack