轻源码

  • QingYuanMa.com
  • 全球最大的互联网技术和资源下载平台
搜索
一起源码网 门户 PHPwind专区 查看主题

9.X的OSS插件出现图片上传至OSS后本地仍有图片附件的处理

发布者: whs-72 | 发布时间: 2018-12-31 04:52| 查看数: 4509| 评论数: 1|帖子模式

提示:如在2015年1月9日前使用了的,请按照以下内容修改(之后的不用修改):
找到“\src\extensions\ossStorage\service\app_ossStorage.php”
在文件中找到
  1. public function save($source, $filePath) {
  2.         if (!$source || !$filePath || !$this->checkIfUploadToOss ()) return false;
  3.         $filePath = $this->configs['attachPath'] ? $this->configs['attachPath'].'/'.$filePath : $filePath;
  4.         $bool =  $this->_uploadToOss($source, $filePath);
  5.         if(!$bool) return false;
  6.         return true;
  7. }
复制代码
把其中
  1. if(!$bool) return false;
复制代码
修改为
  1. if(!$bool){
  2.     return false;
  3. }
  4. else{
  5.     WindFile::del($source);
  6. }
复制代码

最新评论

aini467 发表于 2022-7-16 09:04
开场音乐

浏览过的版块

轻源码让程序更轻更快

QingYuanMa.com

工作时间 周一至周六 8:00-17:30

侵权处理

客服QQ点击咨询

关注抖音号

定期抽VIP

Copyright © 2016-2021 https://www.171739.xyz/ 滇ICP备13200218号

快速回复 返回顶部 返回列表