This is a basic set of server scripts (PHP, C# and VB.net) to implement quick file uploads in CKEditor as described in its documentation.
Alfonso Martínez de Lizarrondo
The instructions will mention "upload.php
", please, pick just the one that matches your server environment and use that, don't copy the rest of files
Before adding the upload.php
file to your server, open it with a text editor and at the start you can see 3 steps that must be performed:
Copy the upload.php
to a folder in your server that it's accesible to the users that are allowed to upload files. Be careful, many malicious robots will try to look for common folder and script names like "upload", "CKEditor", etc... If the script is secured properly this shouldn't be a problem, but there are always unexpected bugs everywhere so it's better to close as many doors as possible. You can even use another name for the script itself.
Now put the path of this script in your CKEditor configuration. If you have placed it in "/uploader/upload.php
" then just state that:
config.filebrowserUploadUrl ='/uploader/upload.php
';
Clear your cache and load CKEditor now. If you have made this last change correctly now when you open the image dialog you should see the Upload tab as shown in the first image here
Select that tab and use the "select file" and "upload to server buttons". If you have made the changes in the upload.php
file correctly (and the path set in filebrowserUploadUrl is also correct) then the file will be uploaded and its url will be shown in the first tab of the Image dialog
CKEditor is © CKSource.com
This script is provided "as is", I'm not responsible for any problem due to its usage or misconfiguration.