upload of any file type

All support enquiries for DFH go in here...

upload of any file type

Postby javaboon » Wed Mar 02, 2011 1:57 pm

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
javaboon
Premium
 
Posts: 34
Joined: Sat Feb 26, 2011 7:13 pm

Re: upload of any file type

Postby javaboon » Wed Mar 02, 2011 2:23 pm

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 :-)
javaboon
Premium
 
Posts: 34
Joined: Sat Feb 26, 2011 7:13 pm

Re: upload of any file type

Postby SamEA » Wed Mar 02, 2011 8:50 pm

Excellent, well done. Will apply this fix :)
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: upload of any file type

Postby SamEA » Thu Mar 03, 2011 12:26 am

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.
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: upload of any file type

Postby javaboon » Thu Mar 03, 2011 6:32 am

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.
javaboon
Premium
 
Posts: 34
Joined: Sat Feb 26, 2011 7:13 pm

Re: upload of any file type

Postby SamEA » Thu Mar 03, 2011 12:59 pm

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.
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm


Return to Daddy's File Host v1.X

Who is online

Users browsing this forum: No registered users and 25 guests

cron