129 Star 902 Fork 190

剑走偏锋 / dcat-admin

 / 详情

hasOne多图无法删除

Backlog
Opened this issue  
2021-08-05 22:57

一对一,多图删除时提示对象不能为空!
输入图片说明

$form->multipleImage('detail.mobile_content', trans('goods-detail.fields.mobile_content'))
                    ->disk('oss')->uniqueName()->autoUpload()->sortable()
                    ->saving(function ($data) {
                        return implode(',', $data);
                    })->autoUpload()->uniqueName();
$form->multipleImage('detail.mobile_buy_content', trans('goods-detail.fields.mobile_buy_content'))
                    ->disk('oss')->uniqueName()->autoUpload()->sortable()
                    ->saving(function ($data) {
                        return implode(',', $data);
                    })->autoUpload()->uniqueName();

Comments (2)

wskeee created任务
wskeee set related repository to 剑走偏锋/dcat-admin
wskeee changed description
Expand operation logs

输入图片说明
输入图片说明
查看代码,发现当删除hasOne关联的多图,会调用两次deleteFile 方法,第一次可以正常删除文件,第二次删除发现找不到文件,调整$storage->url('')文法,就会报当前文件。

包的问题,换个OSS包就好,learnku搜一下oss

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(2)
2004009 jqhph 1596708294
PHP
1
https://gitee.com/jqhph/dcat-admin.git
git@gitee.com:jqhph/dcat-admin.git
jqhph
dcat-admin
dcat-admin

Search

141041 ab9339c7 1850385 141043 25c028d5 1850385