|
@@ -38,7 +38,7 @@ class ImageController |
|
@@ -38,7 +38,7 @@ class ImageController |
|
38
|
$this->request = request();
|
38
|
$this->request = request();
|
|
39
|
$this->config = config('filesystems.disks.upload');
|
39
|
$this->config = config('filesystems.disks.upload');
|
|
40
|
$this->uploads = config('upload.default_image');
|
40
|
$this->uploads = config('upload.default_image');
|
|
41
|
- $this->path = $this->uploads['path'].'/';
|
41
|
+ $this->path = $this->config['root'].$this->uploads['path'].'/';
|
|
42
|
}
|
42
|
}
|
|
43
|
|
43
|
|
|
44
|
/**
|
44
|
/**
|
|
@@ -137,7 +137,7 @@ class ImageController |
|
@@ -137,7 +137,7 @@ class ImageController |
|
137
|
return $this->response($files->getError(), Code::USER_ERROR);
|
137
|
return $this->response($files->getError(), Code::USER_ERROR);
|
|
138
|
}
|
138
|
}
|
|
139
|
$data = [
|
139
|
$data = [
|
|
140
|
- 'path' => $url.$fileName,
|
140
|
+ 'path' => $fileName,
|
|
141
|
'created_at' => date('Y-m-d H:i:s',time()),
|
141
|
'created_at' => date('Y-m-d H:i:s',time()),
|
|
142
|
'size' => $res->getSize(),
|
142
|
'size' => $res->getSize(),
|
|
143
|
'hash' => $hash,
|
143
|
'hash' => $hash,
|
|
@@ -197,7 +197,7 @@ class ImageController |
|
@@ -197,7 +197,7 @@ class ImageController |
|
197
|
return $this->response($file->getError(), Code::USER_ERROR);
|
197
|
return $this->response($file->getError(), Code::USER_ERROR);
|
|
198
|
}
|
198
|
}
|
|
199
|
$save_data[] = [
|
199
|
$save_data[] = [
|
|
200
|
- 'path' => $url.$fileName,
|
200
|
+ 'path' => $fileName,
|
|
201
|
'created_at' => date('Y-m-d H:i:s',time()),
|
201
|
'created_at' => date('Y-m-d H:i:s',time()),
|
|
202
|
'updated_at'=>date('Y-m-d H:i:s',time()),
|
202
|
'updated_at'=>date('Y-m-d H:i:s',time()),
|
|
203
|
'size' => $res->getSize(),
|
203
|
'size' => $res->getSize(),
|