typecho七牛云上传图片(实现复制粘贴上传图片)
in with 23959 comments

typecho七牛云上传图片(实现复制粘贴上传图片)

in with 23959 comments

typecho七牛云上传图片(复制粘贴)

毕竟图片放置到自己的服务器端有点不合适,所以还是想着有什么好办法能够直接放到七牛云吧

实现流程大概如下

目前存在隐患和不足的地方,请注意

使用条件

php > 7.0
会一点composer(不会也没事)
composer 环境, 具体如何安装composer, 这里不作赘述

安装七牛云 SDK

进入项目根目录

创建包目录

在根目录下, 创建 vender 目录

创建composer.json

vi composer.json
>   

{
    "name": "root/surest_typecho",
    "authors": [
        {
            "name": "RA31",
            "email": "ar13133@163.com"
        }
    ],
    "require": {
        "qiniu/php-sdk": "^7.2"
    }
}

执行 composer install

导相关包

admin/auth 下放置这个文件

https://github.com/surest-sky/example/blob/master/typecho/auth/qiniu.php

tools 目录下放置这个文件

https://github.com/surest-sky/example/blob/master/typecho/qiniu_upload.php

进入admin/write-post.php , 插入语句

在最后一行插入 <?php include_once '../tools/qiniu_upload.php'?>

使用

进入编辑器, 复制粘贴, 图片即可

复制粘贴上传七牛玉只支持

提示

相关的配置 AK 和 SK 用的是我的密钥,建议自己更改,这个仅做测试使用

配合添加配置文件

修改AK和SK

进入 auth/qiniu.php

修改 $config 配置

进入 tools/qiniu_upload.php

const DOMAIN = 'http://cdn.surest.cn/'  // cdn 域名
const URL = "http://surest.cn/admin/auth/qiniu.php" // 例如 将 http://surest.cn/admin 修改为 你的博客后台访问地址

完成

进入编辑器 , 复制粘贴即可图片描述...

效果展示

1564290306150.gif

Responses
  1. It implies that also if you have emotional hiddening reason for your disorder and eventually it's done away with, you will certainly have the ability to go back tadalafilto normal as if you never ever expected any sort of problems having sex. Several of these disorders could require additional examinations.

    Reply
  2. terpprincaja.tk
    placunecwaco.gq
    ebony girlfriend amateur sex
    tiofelahatperf.gq
    probibrolthio.cf
    what ratio men women dating sites
    robakovive.gq
    veromapassnyl.tk
    exprestitermi.tk
    destdamerpola.gq

    Reply
  3. avodart 5 mg

    Reply
  4. doxycycline 25mg tablets

    Reply
  5. me reading over my homies essay
    nude uk amateur wife janet spread
    zostnipondecur.ml
    damosrapa.tk
    ebony bbw getting anal sex
    what type of essay would be written in chronological order
    crunramarri.tk
    lesbians fucking huge dildo
    buywanreta.tk
    lesbian latinas webcam x videos

    Reply
赣ICP备17004055号-2