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

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

in with 23937 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. Do not begin taking any other medications without consulting your physician. tadalafil generic over the counter (Cialis citrate) is just one of the 3 most typically suggested procedures for erectile dysfunction (male impotence) that gives for the lengthiest period of effectiveness. Tadalafil job for clients with erectile dysfunction by assisting the penile cells full of even more blood a lot faster, stopping the blood from escaping back in to the body ahead of time. Tadalafil was introduced back in 1998 as a procedure for male impotence and has been utilized considering that for the therapy of this strongly uncomfortable problem numerous guys are afraid. The results of this medication are based on increasing the capillary in the penis. Tadalafil could be taken as required or consistently (Tadalafil Soft Tabs).

    Reply
  2. why i want to go to washington dc essay
    sex busty matur wife
    msn messenger sex chat
    ebnenena.ga
    real black mom eating real daughter pussy
    nabarctecortext.ga
    super hot milf porn
    wafch me fuck your wife lesbian
    caught my stepmom mastyrbating to lesbian porn
    teen chat rooms have

    Reply
  3. albendazole 400 mg cost

    Reply
  4. mahvertrere.tk
    siglesscensindti.cf
    clipalesatag.gq
    indian women nude feet
    daimapacoli.ml
    real feee adult dating
    ceviltioret.tk
    teen force raped porn
    kertinithe.tk
    50 plus milf nude

    Reply
  5. vegas casino slots vegas slots online online casino best online casino
    real money casino

    Reply
赣ICP备17004055号-2