zac3533 1 年間 前
コミット
b1575fbbdd
2 ファイル変更1 行追加55 行削除
  1. 1 1
      application/admin/controller/Ajax.php
  2. 0 54
      application/common/library/Oss.php

+ 1 - 1
application/admin/controller/Ajax.php

@@ -122,7 +122,7 @@ class Ajax extends Backend
                 $filename = $file->getInfo();
                 //获取oss实例
                 $ossClient = new OssClient(Env::get('oss.key_id'), Env::get('oss.key_secret'), Env::get('oss.endpoint'));
-                $bucket    = Env::get('oss.dbucket'); 
+                $bucket    = Env::get('oss.bucket'); 
                 $uploadpath = "tou-biao/" . date("Ym") . "/" . $filename['name'];
                 $rs = $ossClient->uploadFile($bucket, $uploadpath, $file->getRealPath());
   

+ 0 - 54
application/common/library/Oss.php

@@ -1,54 +0,0 @@
-<?php
-
-namespace app\common\library;
-
-use Psr\Log\AbstractLogger;
-use think\Hook;
-
-/**
- * Oss文件上传
- */
-class Oss extends AbstractLogger
-{
-
-       /**
-     * phpmailer对象
-     */
-    protected $mail = null;
-
-    /**
-     * 错误内容
-     */
-    protected $error = '';
-
-
-
-    /**
-     * 构造函数
-     * @param array $options
-     */
-    public function __construct($options = [])
-    {
- 
-
-        //设置发件人
-        $this->from($this->options['mail_from'], $this->options['mail_smtp_user']);
-    }
-
-
-    /**
-     * Logs with an arbitrary level.
-     *
-     * @param mixed  $level
-     * @param string $message
-     * @param array  $context
-     *
-     * @return void
-     *
-     * @throws \Psr\Log\InvalidArgumentException
-     */
-    public function Init($level, $message, array $context = array())
-    {
-        \think\Log::write($message);
-    }
-}