Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Fileupload - Allow only images

edited August 2011 in Vanilla 2.0 - 2.8
I today saw, a new user uploaded a doc file. Is there any way to allow users to upload only images?

Right now, what type of files can they upload?
Tagged:

Best Answer

  • clethrillclethrill ✭✭
    Answer ✓
    In the plugin's config file (config-defaults.php) there is a line:

    $Configuration['Garden']['Upload']['AllowedFileExtensions'] = array('txt','jpg','gif','png','bmp','zip','gz','tar.gz','tgz','psd','ai','fla','swf','pdf','doc','xls','ppt','docx','xlsx','log');

    Change the file extensions to what you wish.
    like maybe only jpg, jpeg, png, bmp, gif

Answers

  • clethrillclethrill ✭✭
    Answer ✓
    In the plugin's config file (config-defaults.php) there is a line:

    $Configuration['Garden']['Upload']['AllowedFileExtensions'] = array('txt','jpg','gif','png','bmp','zip','gz','tar.gz','tgz','psd','ai','fla','swf','pdf','doc','xls','ppt','docx','xlsx','log');

    Change the file extensions to what you wish.
    like maybe only jpg, jpeg, png, bmp, gif
  • Thank you!
Sign In or Register to comment.