Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Mime types

  1. #1
    Regular Coder
    Join Date
    May 2005
    Posts
    563
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Mime types

    Hi

    I was wondering if it is possible to check a file mime type before uploading using the filereference class. I deal with idiotic clients that think it's ok to rename files from .gif to .jpg when it tells then they can only upload .jpg files.

    Is it possible to check what type a file really is as the fileref.type function only returns the extension.

    Thanks

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    I think you'll need to use an external script to do that. Not positive on that though.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #3
    Regular Coder
    Join Date
    May 2005
    Posts
    563
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Yeah, I was hoping I could do instant feedback so they don't go ahead uploading 5MB images only to find out they've done something dumb.

  • #4
    New Coder
    Join Date
    Apr 2008
    Location
    Makati Philippines
    Posts
    34
    Thanks
    0
    Thanked 1 Time in 1 Post
    you can use php's mime_content_type() function. it is server side so it requires ur file to be uploaded 1st. i dont think there is a way in actionscript.
    Hope is a good thing, maybe the best of things. And no good thing ever dies. -Andy Dufresne

    Jairus Bondoc PHP Programmer Philippines


  •  

    Posting Permissions

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