I'm having a problem with trying to get CKFinder to place uploaded files into subdirectories using the php $_GET variable
this is how i have the config set up:
can anyone explain to me why this isn't working and/or how to get it working?
this is how i have the config set up:
$baseUrl = 'xxxxxx/userfiles/'.$_GET['$DeptId'].'/'; $baseDir = 'xxxxxx/userfiles/'.$_GET['$DeptId'].'/';
can anyone explain to me why this isn't working and/or how to get it working?

session_start();
$_SESSION['DeptId']=$_GET['$DeptId'];
in config.php
session_start();
/*code*/
$baseUrl = 'xxxxxx/userfiles/'.$_SESSION[DeptId'].'/';
tried what you said, but no luck...it's still not working :/
any other suggestions?
i've been scouring these forums for days and haven't really found an adequate way to do this....
is there some other way to achieve the same results?
Thanks.
i don't think i understand the solution clearly then...
could you send me a code snippet from your config.php and the file where you receive the $_GET variable? thanks in advance...
NVM. I got it working! stupid mistake...i was making syntax errors
here is my config file:
and the file where i receive the $_GET variable:
Cheers!
Wiktor Walc
CTO
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
I've used a $_SESSION variable to set $baseDir value and it works fine as described before.
The problem is that each time a photo is uploaded the system creates nested subfolders in the thumbs directory (mcith).
I think this is due to the session_start() but can't figure out to solve the problem.
This is my config.php
<?php session_start(); function CheckAuthentication() { if ((isset($_SESSION['userid'])) && ($_SESSION['userid'] !="")) { return true; } else { return false; } } $partefinale = '/images/'.$_SESSION['userid'].'/'; $baseUrl = 'http://xxxx.com'.$partefinale ; $baseDir = '/var/www/httpdocs'.$partefinale; $config['Thumbnails'] = Array( 'url' => $baseUrl . 'mcith', 'directory' => $baseDir . 'mcith', 'enabled' => true, 'directAccess' => false, 'maxWidth' => 140, 'maxHeight' => 140, 'bmpSupported' => false, 'quality' => 100); $config['Images'] = Array( 'maxWidth' => 430, 'maxHeight' => 930, 'quality' => 100); $config['RoleSessionVar'] = 'CKFinder_UserRole'; $config['AccessControl'][] = Array( 'role' => '*', 'resourceType' => '*', 'folder' => '/', 'folderView' => true, 'folderCreate' => false, 'folderRename' => false, 'folderDelete' => true, 'fileView' => true, 'fileUpload' => true, 'fileRename' => true, 'fileDelete' => true); $config['DefaultResourceTypes'] = ''; $config['ResourceType'][] = Array( 'name' => '/', // Single quotes not allowed 'url' => $baseUrl, 'directory' => $baseDir, 'maxSize' => '4M', 'allowedExtensions' => 'gif,jpeg,jpg,png', 'deniedExtensions' => 'js,php,asp,html,cgi,zip,rar,tar,bat,exe'); $config['CheckDoubleExtension'] = true; $config['FilesystemEncoding'] = 'UTF-8'; $config['SecureImageUploads'] = true; $config['CheckSizeAfterScaling'] = true; $config['HtmlExtensions'] = array('html', 'htm', 'xml', 'js');Can you help me????
Thanks!