Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Fixed bug with PNG images uploading as JPEG #129

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ KCFinder is free open-source replacement of CKFinder web file manager. It can be
* Ajax engine with JSON responses
* Multiple files upload
* Upload files using HTML5 drag and drop from local file manager
* Drag and drop images from external HTML pages. Multiple images can be dropped using selection (Firefox only)
* Download multiple files or a folder as single ZIP file
* Select multiple files with the Ctrl/Command key
* Clipboard for copying, moving and downloading multiple files
* Easy to integrate and configure in web applications
* Option to select and return several files. For custom applications only
* Resize uploaded images. Configurable maximum image resolution
* Auto resize uploaded images. Configurable maximum image resolution
* PNG watermark support
* Configurable thumbnail resolution
* Automaticaly rotate and/or flip uploaded images depending on the orientation info EXIF tag if it exist
Expand All @@ -28,10 +26,11 @@ KCFinder is free open-source replacement of CKFinder web file manager. It can be
* Preview images in full size

## Compatibility
* KCFinder is officialy tested on Apache 2 web server only, but probably it will work on other web servers.
* KCFinder is officialy tested on Apache 2 web server only. Probably it will works on other web servers. If your web server does not support .htaccess files, you should take care turning off script execution in the upload directory.
* PHP 5.3 or better is required. Safe mode should be off.
* At least one of these PHP extensions is required: GD, ImageMagick or GraphicsMagick.
* To work with client-side HTTP cache, the PHP must be installed as Apache module.
* KCFinder supports MIME type recognition for the uploaded files. If you plan to use this feature, you should to load Fileinfo PHP extension.
* KCFinder supports Fileinfo PHP extension for MIME type detection for uploaded files. If you plan to use this feature, you should to load Fileinfo extension.
* PHP ZIP extension should be loaded in order to have an option to download multiple files and directories as single ZIP file.
* Automatic rotating and flipping images requires PHP EXIF extension.
* Browser side code requires modern browser. KCFinder does not work in Internet Explorer 6, 7 and 8, but you can use Google Chrome Frame ActiveX plugin to get it working.
24 changes: 13 additions & 11 deletions browse.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<?php

/** This file is part of KCFinder project
*
* @desc Browser calling script
* @package KCFinder
* @version 3.12
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
* @license http://opensource.org/licenses/LGPL-3.0 LGPLv3
* @link http://kcfinder.sunhater.com
*/
*
* @desc Browser calling script
* @package KCFinder
* @version 3.12
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
* @license http://opensource.org/licenses/LGPL-3.0 LGPLv3
* @link http://kcfinder.sunhater.com
*/

require "core/bootstrap.php";
$browser = "kcfinder\\browser"; // To execute core/bootstrap.php on older
$browser = new $browser(); // PHP versions (even PHP 4)
$browser = new $browser(); // PHP versions (even PHP 4)
$browser->action();

?>
208 changes: 207 additions & 1 deletion cache/base.css
Original file line number Diff line number Diff line change
@@ -1 +1,207 @@
html,body{overflow:hidden}body,form,th,td{margin:0;padding:0}a{cursor:pointer}*{font-family:Tahoma,Verdana,Arial,sans-serif;font-size:11px}table{border-collapse:collapse}#left{float:left;display:block;width:25%}#right{float:left;display:block;width:75%}#settings{display:none;padding:0;float:left;width:100%}#settings>div{float:left}#folders{padding:5px;overflow:auto}#toolbar{padding:5px}#files{padding:5px;overflow:auto}#status{padding:5px;float:left;overflow:hidden}#fileinfo{float:left}#clipboard div{width:16px;height:16px}.folders{margin-left:16px}div.file{overflow-x:hidden;float:left;text-align:center;cursor:default;white-space:nowrap}div.file .thumb{background:no-repeat center center}#files table{width:100%}tr.file{cursor:default}tr.file>td{white-space:nowrap}tr.file>td.name{background-repeat:no-repeat;background-position:left center;padding-left:20px;width:100%}tr.file>td.time,tr.file>td.size{text-align:right}#toolbar{cursor:default;white-space:nowrap}#toolbar a{padding-left:20px;text-decoration:none;background:no-repeat left center}#toolbar a:hover,a[href="#upload"].uploadHover{color:#000}#upload{position:absolute;overflow:hidden;opacity:0;filter:alpha(opacity=0)}#upload input,#upload input::-webkit-file-upload-button{cursor:pointer}span.brace{padding-left:11px;cursor:default}span.brace.opened,span.brace.closed{cursor:pointer}#menu,#clipboard{position:absolute;display:none;z-index:101;cursor:default}#menu .box,#alert{max-width:350px}#clipboard{z-index:99}#loading{display:none;float:right}.menu{background:#888;white-space:nowrap}.menu a{display:block}.menu .list{max-height:0;overflow-y:auto;overflow-x:hidden;white-space:nowrap}#uploadResponse,.file .access,.file .hasThumb{display:none}#resizer{position:absolute;z-index:98;top:0;background:#000;opacity:0;filter:alpha(opacity=0)}#lang{opacity:0;filter:alpha(opacity=0)}.tf-select,.tf-multiple,.tf-file,.tf-radio,.tf-checkbox,.tf-button{cursor:default;overflow:auto;display:-moz-inline-box;display:inline-block;zoom:1;vertical-align:middle}.tf-select .tf-selected{float:left;white-space:nowrap}.tf-select .tf-menu{display:none;position:absolute;max-height:173px;overflow-x:hidden;overflow-y:auto}.tf-select.tf-opened .tf-menu{display:block}.tf-select .tf-button{float:right}.tf-select select,.tf-multiple select{position:absolute;left:-1000000px;opacity:0;filter:alpha(opacity=0)}.tf-select .tf-menu ul,.tf-multiple ul{padding:0;margin:0;list-style-type:none}.tf-select .tf-menu li,.tf-multiple li{padding:0;margin:0}.tf-multiple span,.tf-select .tf-button span{white-space:nowrap}.tf-textarea{resize:none;overflow:auto}.tf-multiple{max-height:118px}.tf-file input,.tf-radio input,.tf-checkbox input,.tf-button input,.tf-button button{position:absolute;opacity:0;filter:alpha(opacity=0);outline:0;margin:0;padding:0}.tf-file{overflow:hidden}.tf-file .tf-info{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;float:right}.tf-file .tf-button{float:right}body.mobile{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none}body.firefox #files>div{overflow:auto;margin-bottom:5px}
html, body {
overflow: hidden;
}

body, form, th, td {
margin: 0;
padding: 0;
}

a {
cursor: pointer;
}

* {
font-family: Tahoma, Verdana, Arial, sans-serif;
font-size: 11px;
}

table {
border-collapse: collapse;
}

#left {
float: left;
display: block;
width: 25%;
}

#right {
float: left;
display: block;
width: 75%;
}

#settings {
display: none;
padding: 0;
float: left;
width: 100%;
}

#settings > div {
float: left;
}

#folders {
padding: 5px;
overflow: auto;
}

#toolbar {
padding: 5px;
}

#files {
padding: 5px;
overflow: auto;
}

#status {
padding: 5px;
float: left;
overflow: hidden;
}

#fileinfo {
float: left;
}

#clipboard div {
width: 16px;
height: 16px;
}

.folders {
margin-left: 16px;
}

div.file {
overflow-x: hidden;
float: left;
text-align: center;
cursor: default;
white-space: nowrap;
}

div.file .thumb {
background: no-repeat center center;
}

#files table {
width: 100%;
}

tr.file {
cursor: default;
}

tr.file > td {
white-space: nowrap;
}

tr.file > td.name {
background-repeat: no-repeat;
background-position: left center;
padding-left: 20px;
width: 100%;
}

tr.file > td.time,
tr.file > td.size {
text-align: right;
}

#toolbar {
cursor: default;
white-space: nowrap;
}

#toolbar a {
padding-left: 20px;
text-decoration: none;
background: no-repeat left center;
}

#toolbar a:hover, a[href="#upload"].uploadHover {
color: #000;
}

#upload {
position: absolute;
overflow: hidden;
opacity: 0;
filter: alpha(opacity=0);
}
#upload input, #upload input::-webkit-file-upload-button {
cursor: pointer;
}

span.brace {
padding-left: 11px;
cursor: default;
}

span.brace.opened, span.brace.closed {
cursor: pointer;
}

#menu, #clipboard {
position: absolute;
display: none;
z-index: 101;
cursor: default;
}

#menu .box, #alert {
max-width: 350px;
}

#clipboard {
z-index: 99;
}

#loading {
display: none;
float: right;
}

.menu {
background: #888;
white-space: nowrap;
}

.menu a {
display: block;
}

.menu .list {
max-height: 0;
overflow-y: auto;
overflow-x: hidden;
white-space: nowrap;
}

#uploadResponse,
.file .access,
.file .hasThumb {
display: none;
}

#resizer {
position: absolute;
z-index: 98;
top: 0;
background: #000;
opacity: 0;
filter: alpha(opacity=0);
}body.mobile {
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
}

body.firefox #files > div {
overflow: auto;
margin-bottom: 5px;
}
4,572 changes: 4,570 additions & 2 deletions cache/base.js

Large diffs are not rendered by default.

2,409 changes: 2,408 additions & 1 deletion cache/theme_dark.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cache/theme_dark.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$.each(["loading.gif","ui-icons_black.png","ui-icons_grey.png","ui-icons_white.png"],function(b,a){new Image().src="themes/dark/img/"+a});
new Image().src = 'themes/dark/img/loading.gif'; // preload animated gif
2,441 changes: 2,440 additions & 1 deletion cache/theme_default.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cache/theme_default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$.each(["loading.gif","ui-icons_black.png","ui-icons_blue.png","ui-icons_white.png"],function(b,a){new Image().src="themes/default/img/"+a});
new Image().src = 'themes/default/img/loading.gif'; // preload animated gif
Loading