projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2c88790
)
kludgy fix to uploading image/jpg
author
Alan
<alan@roojs.com>
Tue, 28 Jun 2022 05:54:20 +0000
(13:54 +0800)
committer
Alan
<alan@roojs.com>
Tue, 28 Jun 2022 05:54:20 +0000
(13:54 +0800)
DataObjects/Images.php
patch
|
blob
|
history
Images.php
patch
|
blob
|
history
diff --git
a/DataObjects/Images.php
b/DataObjects/Images.php
index
f2c39c3
..
58e10a7
100644
(file)
--- a/
DataObjects/Images.php
+++ b/
DataObjects/Images.php
@@
-858,6
+858,10
@@
class Pman_Core_DataObjects_Images extends DB_DataObject
$this->mimetype = strtolower($this->mimetype);
$this->mimetype = strtolower($this->mimetype);
+ if ($this->mimetype == 'image/jpg') {
+ $this->mimetype = 'image/jpeg';
+ }
+
$explode_mimetype = explode('/', $this->mimetype);
$explode_mimetype = explode('/', $this->mimetype);
diff --git
a/Images.php
b/Images.php
index
32859e1
..
eff84f5
100644
(file)
--- a/
Images.php
+++ b/
Images.php
@@
-85,7
+85,7
@@
class Pman_Core_Images extends Pman
//if (!empty($_GET['_post'])) {
// return $this->post();
//}
//if (!empty($_GET['_post'])) {
// return $this->post();
//}
-
+
$this->is_local = (!empty($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == 'localhost') ? true : false;
$this->as_mimetype = empty($_REQUEST['as']) ? '' : $_REQUEST['as'];
$this->is_local = (!empty($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == 'localhost') ? true : false;
$this->as_mimetype = empty($_REQUEST['as']) ? '' : $_REQUEST['as'];
@@
-283,7
+283,6
@@
class Pman_Core_Images extends Pman
function serve($img)
{
$this->sessionState(0); // turn off session... - locking...
function serve($img)
{
$this->sessionState(0); // turn off session... - locking...
-
require_once 'File/Convert.php';
if (!file_exists($img->getStoreName())) {
// print_r($img);exit;
require_once 'File/Convert.php';
if (!file_exists($img->getStoreName())) {
// print_r($img);exit;