Page 1 of 1
upload of any file type
Posted:
Wed Mar 02, 2011 1:57 pm
by javaboon
Is it possible to configure the script in order to allow uploads of any type? e.g. like *.* ? i tried setting this in the configuration manager, but it will not allow the file upload. i also tried * but same result
Re: upload of any file type
Posted:
Wed Mar 02, 2011 2:23 pm
by javaboon
found it myself.
original code of upload.php
- Code: Select all
$file_types = str_replace(".",'',"$file_types");
$file_types = str_replace("*",'',"$file_types");
if (stristr($file_types, $file_types_check) <> FALSE || $file_types == "*")
and modified:
- Code: Select all
$file_types = str_replace(".",'',"$file_types");
//$file_types = str_replace("*",'',"$file_types");
if (stristr($file_types, $file_types_check) <> FALSE || $file_types == "*")
the str_replace of * with ยจ does no good with the if check on the next line
Re: upload of any file type
Posted:
Wed Mar 02, 2011 8:50 pm
by SamEA
Excellent, well done. Will apply this fix
Re: upload of any file type
Posted:
Thu Mar 03, 2011 12:26 am
by SamEA
After looking into the bug, I realised you had an out-dated version of DFH. In the newer version, there is a file_types2 variable and not just file_types. You have to download the newer version.
Re: upload of any file type
Posted:
Thu Mar 03, 2011 6:32 am
by javaboon
Ehm, it is the one on the anncouncement, i deleted the whole thing yesterday and did a fresh install from there.. But let me double check.
Re: upload of any file type
Posted:
Thu Mar 03, 2011 12:59 pm
by SamEA
Yes, but DFH has been updated three times already as stated on the official announcement post. You didn't have to delete the whole script btw, you could have just replaced the php files, but if you don't have anyone hosting files with you yet then it shouldn't really matter.