A5下载文章资讯

分类分类

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

2015-11-26 16:35作者:fang

打开 /src/extensions/ossStorage/service/app_ossStorage.php 文件

找到

public function save($source, $filePath) {

if (!$source || !$filePath || !$this->checkIfUploadToOss ()) return false;

$filePath = $this->configs['attachPath'] ? $this->configs['attachPath'].'/'.$filePath : $filePath;

$bool = $this->_uploadToOss($source, $filePath);

if(!$bool) return false;

return true;

}

把其中

if(!$bool) return false;

修改为

if(!$bool){

return false;

}

else{

WindFile::del($source);

}

提示:2015年1月9日前使用了9.X云存储(OSS For phpwind)插件的,请按照以上内容修改(之后的不用修改)

以上就是本文章的内容,希望对大家有所帮助。

展开全部

相关

说两句网友评论
    我要跟贴
    取消