Ticket #1966 (new New Feature)

Opened 5 months ago

Last modified 5 months ago

Add viewable extensions to File Browser

Reported by: saidbakr Owned by:
Priority: Normal Milestone:
Component: File Browser Version:
Keywords: Confirmed Cc:

Description

In \connectors\php\config.php when trying to add denied extenstions to any of File, Image, Flash or media it seems to do nothing and the file browser show all files in the directory.

$Config['AllowedExtensions']['Image']	= array('bmp','gif','jpeg','jpg','png') ;
$Config['DeniedExtensions']['Image']	= array('php','txt') ;

Look at the attached image

For this example the file browser still show php files in image directory in addition of any other file founded in the image directory.

The server is Apache and working on Windows XP SP2, in other word I use XAMPP 161.

I think this bug due to the way of dealing with the FileTypesAbsolutePath? and windows.

$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/';

In windows the absolute path does not represented as, for example, C:/server/site/ , but it should represented as C:\server\site\

Attachments

deniedextensions.JPG (47.5 kB) - added by saidbakr 5 months ago.
A screen shot of the resource browser called onclick of brows server button in Image properties window
config.php (8.2 kB) - added by saidbakr 5 months ago.
The PHP connector configuration
fckconfig.js (14.4 kB) - added by saidbakr 5 months ago.
The editor javascript config

Change History

Changed 5 months ago by saidbakr

A screen shot of the resource browser called onclick of brows server button in Image properties window

  Changed 5 months ago by saidbakr

The version of FCKeditor is 2.5.1 Build 17566

Changed 5 months ago by saidbakr

The PHP connector configuration

Changed 5 months ago by saidbakr

The editor javascript config

  Changed 5 months ago by wwalc

Currently file browser displays all files, regardless of the allowed/denied list. The allowed/denied extensions list is used during file uploads. If you need such functionality (and much more), you can try CKFinder.

follow-up: ↓ 4   Changed 5 months ago by w.olchawa

  • keywords Confirmed added
  • type changed from Bug to New Feature
  • component changed from General to File Browser
  • summary changed from Allowed and denied Extensions does not work properly in php to Add viewable extensions to File Browser

It could be a new feature in the File Browser. Something like:

$Config['ViewableExtensions']['Image']	= array('png','bmp') ;

then the possibility of inserting an invalid file type (which is already on the server) would be impossible

in reply to: ↑ 3   Changed 5 months ago by saidbakr

Yes it will be very good. Go on I wait it to be implemented. Thank You! Replying to w.olchawa:

It could be a new feature in the File Browser. Something like: {{{ $ConfigViewableExtensions?Image? = array('png','bmp') ; }}} then the possibility of inserting an invalid file type (which is already on the server) would be impossible

  Changed 5 months ago by w.olchawa

#1978 has been marked as DUP

Note: See TracTickets for help on using tickets.