|
@@ -61,7 +61,7 @@ class Attachment extends BaseController
|
|
|
], $this->request, true);
|
|
], $this->request, true);
|
|
|
try {
|
|
try {
|
|
|
$path = make_path('attach', 2, true);
|
|
$path = make_path('attach', 2, true);
|
|
|
- $upload = new Upload(2,config('upload')['stores']['qiniu']);
|
|
|
|
|
|
|
+ $upload = new Upload(2,config('qiniu')['upload']);
|
|
|
$res = $upload->to($path)->validate()->move($file);
|
|
$res = $upload->to($path)->validate()->move($file);
|
|
|
if ($res === false) {
|
|
if ($res === false) {
|
|
|
return app('json')->fail($upload->getError());
|
|
return app('json')->fail($upload->getError());
|
|
@@ -85,7 +85,7 @@ class Attachment extends BaseController
|
|
|
$attinfo = AttachmentModel::get($att_id);
|
|
$attinfo = AttachmentModel::get($att_id);
|
|
|
if ($attinfo) {
|
|
if ($attinfo) {
|
|
|
try {
|
|
try {
|
|
|
- $upload = new Upload(2,config('upload')['stores']['qiniu']);
|
|
|
|
|
|
|
+ $upload = new Upload(2,config('qiniu')['upload']);
|
|
|
$upload->delete($attinfo['name']);
|
|
$upload->delete($attinfo['name']);
|
|
|
} catch (\Throwable $e) {
|
|
} catch (\Throwable $e) {
|
|
|
}
|
|
}
|