|
@@ -3,6 +3,9 @@ use Dever;
|
|
class Save
|
|
class Save
|
|
{
|
|
{
|
|
private $config;
|
|
private $config;
|
|
|
|
+ private $cate_id;
|
|
|
|
+ private $group_id;
|
|
|
|
+ private $user_id;
|
|
private $ext = array
|
|
private $ext = array
|
|
(
|
|
(
|
|
1 => 'jpg,png,gif,webp,jpeg',
|
|
1 => 'jpg,png,gif,webp,jpeg',
|
|
@@ -168,7 +171,7 @@ class Save
|
|
# type 1是文件复制 2是base64 3是远程文件复制
|
|
# type 1是文件复制 2是base64 3是远程文件复制
|
|
$url = Dever::load('tool', 'upload')->get($this->config['save'])->upload($type, $source, $dest, $chunk, $this);
|
|
$url = Dever::load('tool', 'upload')->get($this->config['save'])->upload($type, $source, $dest, $chunk, $this);
|
|
$data = $this->up($source_name, $name, $dest, $this->config['size'], $this->config['width'] ?? 0, $this->config['height'] ?? 0);
|
|
$data = $this->up($source_name, $name, $dest, $this->config['size'], $this->config['width'] ?? 0, $this->config['height'] ?? 0);
|
|
- $data['url'] = $url;
|
|
|
|
|
|
+ $data['url'] = $url . '?t=' . time();
|
|
$data['type'] = $this->type;
|
|
$data['type'] = $this->type;
|
|
if (isset($content)) {
|
|
if (isset($content)) {
|
|
@unlink($source);
|
|
@unlink($source);
|
|
@@ -317,7 +320,7 @@ class Save
|
|
if ($uid) {
|
|
if ($uid) {
|
|
$id = abs(intval($uid));
|
|
$id = abs(intval($uid));
|
|
$id = sprintf("%09d", $id);
|
|
$id = sprintf("%09d", $id);
|
|
- $dest = DIRECTORY_SEPARATOR . substr($id, 0, 3) . DIRECTORY_SEPARATOR . substr($id, 3, 2) . DIRECTORY_SEPARATOR . substr($id, 5, 2) . DIRECTORY_SEPARATOR . $uid . '.' . $ext;
|
|
|
|
|
|
+ $dest = substr($id, 0, 3) . DIRECTORY_SEPARATOR . substr($id, 3, 2) . DIRECTORY_SEPARATOR . substr($id, 5, 2) . DIRECTORY_SEPARATOR . $uid . '.' . $ext;
|
|
$name = $uid;
|
|
$name = $uid;
|
|
} else {
|
|
} else {
|
|
if (!strpos($name, '_cr_')) {
|
|
if (!strpos($name, '_cr_')) {
|