sunhater / kcfinder

KCFinder web file manager
http://kcfinder.sunhater.com
403 stars 207 forks source link

How can i change folder for upload image? #126

Open InkyThousand opened 8 years ago

InkyThousand commented 8 years ago

Hello, help me please. How can I change default folder fo upload images. In my project i have "public/uploads" folder for all pictures, but kcfinder create "image" folder. I need upload from file manager right into public/uploads, not to image.

danitxo commented 8 years ago

I think that you need to set this config:

'uploadDir' => "http://domain.com/path/to/public/", // or absolute or relative "/path/to/public/" 'types' => array( // each "type" means a shared folder 'uploads' => array( // "uploads" will be one "shared folder" // options for this upload folder }, // another array if you want to have more "shared folders" folder from .../public/ ),

All configuration options explained are on http://kcfinder.sunhater.com/install

noncent commented 7 years ago

or you can use

'KCFINDER' SESSION Key

to pass Config Settings:

// Set KcFinder session array to setup upload url
$_SESSION['KCFINDER'] = array 
(
    'uploadURL' => 'http://www.yourdomain.com/upload',
    'uploadDir' => 'var/etc/www/project/upload'
); 

Link : KcFinder_CkEditor_Absolute_Url