I have a problem or maybe I missed something in the documentation, but I try to solve my problem for days.
I do the changes in connectors.php (I don't comment $Config['UserFiles'] because I store the files there) and if I upload any files with Image upload, Flash upload, etc. the files uploaded to the right directory. By if I use the simple upload directory the files uploaded to the http://www.domain.hu/UserFIles directory but that directory I can't browse. I can only browse the http://www.domain.hu/UserFiles/Image ..../File etc directory. Why is this? Why can I upload any files to a directory what I can't reach with filemanager browser. How can I solve this or if I can't, how could I disable simple upload page on the uploader popup window.
I hope somebody can help me.
Krisz
Thu, 10/13/2005 - 01:09
#1
RE: Filemanager upload
Pick up the file filemanager/upload/php/upload.php
After these lines (around line 71):
// The the target directory.
if ( isset( $Config['UserFilesAbsolutePath'] ) )
$sServerDir = $Config['UserFilesAbsolutePath'] ;
else
$sServerDir = GetRootPath() . $Config["UserFilesPath"] ;
Write these new lines:
switch ($sType) {
case 'File' :
$sServerDir .= "File/";
$for_result_sending = "File/";
break;
case 'Image':
$sServerDir .= "Image/";
$for_result_sending = "Image/";
break;
case 'Flash':
$sServerDir .= "Flash/";
$for_result_sending = "Flash/";
break;
case 'Media':
$sServerDir .= "Media/";
$for_result_sending = "Media/";
break;
}
and about at the bottom of the file, replace this line:
$sFileUrl = $Config["UserFilesPath"] . $sFileName ;
with this new one:
$sFileUrl = $Config["UserFilesPath"] . $for_result_sending . $sFileName ;
This works for me, but I made few tests, 'cause I just wrote it 10 minutes ago.
Maybe the switch can be restricted just to Image and Flash, I dunno if File and Media have their own direct upload system. Well, this way should not cause problem aswell.