如题~
没开通过OSS,没法测试开发。
看有没有哪个开发者弄一个吧
不难的. 不用看文档,你参考这个文件
\plugins\weixin\index\Mpimg.php
现成的方法
private static function oss($path='',$module='cms'){ $from='wangeditor'; $file_info = [ 'path' => $path, 'url' => PUBLIC_URL . $path, 'name' => basename($path), 'tmp_name' => PUBLIC_PATH . $path, 'size' => '0', 'type' => 'image/gif', ]; if ( config( 'webdb.upload_driver' ) && config( 'webdb.upload_driver' ) != 'local' ) { $hook_result = \think\Hook::listen( 'upload_driver',$file_info,[ 'from' => $from, 'module' => $module, 'type' => 'gather', ],true ); if ( false !== $hook_result && strstr($hook_result,'http')) { write_file( PUBLIC_PATH . $path , $hook_result); return $hook_result; } } return $path; }
看看有没开发者弄吧,没人弄月底我来更新下吧,目前全心投入教程制作中
不难的. 不用看文档,你参考这个文件
\plugins\weixin\index\Mpimg.php
现成的方法