sort out a few more large image upload issues
This commit is contained in:
@@ -210,8 +210,6 @@ class Browser extends DAV\Browser\Plugin {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$attachIcon = ""; // "<a href=\"attach/".$attachHash."\" title=\"".$displayName."\"><i class=\"fa fa-arrow-circle-o-down\"></i></a>";
|
||||
|
||||
// put the array for this file together
|
||||
|
@@ -299,6 +299,17 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
|
||||
$is_photo = 1;
|
||||
}
|
||||
|
||||
// If we know it's a photo, over-ride the type in case the source system could not determine what it was
|
||||
|
||||
if($is_photo) {
|
||||
q("update attach set filetype = '%s' where hash = '%s' and uid = %d",
|
||||
dbesc($gis['mime']),
|
||||
dbesc($hash),
|
||||
intval($c[0]['channel_id'])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// updates entry with filesize and timestamp
|
||||
$d = q("UPDATE attach SET filesize = '%s', os_path = '%s', display_path = '%s', is_photo = %d, edited = '%s' WHERE hash = '%s' AND uid = %d",
|
||||
dbesc($size),
|
||||
|
@@ -168,6 +168,17 @@ class File extends DAV\Node implements DAV\IFile {
|
||||
if(($gis) && ($gis[2] === IMAGETYPE_GIF || $gis[2] === IMAGETYPE_JPEG || $gis[2] === IMAGETYPE_PNG)) {
|
||||
$is_photo = 1;
|
||||
}
|
||||
|
||||
// If we know it's a photo, over-ride the type in case the source system could not determine what it was
|
||||
|
||||
if($is_photo) {
|
||||
q("update attach set filetype = '%s' where hash = '%s' and uid = %d",
|
||||
dbesc($gis['mime']),
|
||||
dbesc($this->data['hash']),
|
||||
intval($this->data['uid'])
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
// this shouldn't happen any more
|
||||
|
Reference in New Issue
Block a user