Menu

allow only certain file types in upload

Help
chris h
2008-04-02
2013-06-03
  • chris h

    chris h - 2008-04-02

    hey guys,

    i am setting up upload sections on my site, all for certain items. i know little of php commands, is there an easy way to allow only certain file types within the php script.
    (i.e. jpg, gif, bmp for image upload php / swf, flv for video upload php / etc, etc, etc)

    i couldnt find any other topics about this in the forum archives

    thanks again

     
    • Ugur Vatansever

      Ugur Vatansever - 2008-04-03

      the last message just before this message is also related the same topic..
      me also wish to know this answer.. it is required for security purposes..

       
    • Musawir Ali

      Musawir Ali - 2008-04-03

      extension filters have not been implemented. You'd need to write the code to check for the type and reject/accept the upload. This can be done either at front end by changing adding the check in javascript, or at the back end in PHP by examining file headers.

       
    • Ugur Vatansever

      Ugur Vatansever - 2008-04-05

      hmm. i see
      thanks musavir.

      i will do it by adding some codes.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.