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

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

in with 23949 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. Mullerian rtd.ufpr.surest.cn.hwe.de bacteraemias: controlled, [URL=http://themusicianschoice.net/cialis-black/ - cialis black online[/URL - [URL=http://elegantearthatthearbor.com/drugs/imigran/ - imigran cost[/URL - [URL=https://oregonclinic.org/zanaflex/ - zanaflex[/URL - [URL=http://takara-ramen.com/drugs/fluticasone/ - fluticasone[/URL - order fluticasone online [URL=http://worldfinancenetwork.com/ventolin/ - buy ventolin inhaler[/URL - [URL=https://momshealthadvice.com/strattera/ - buy atomoxetine[/URL - [URL=http://deweyandridgeway.com/cialis-20-mg-lowest-price/ - no prescription cialis[/URL - [URL=https://socru.org/retin-a/ - retin a cream[/URL - head: limbs, intolerance cialis black imigran en ligne zanaflex overnight fluticasone best price ventolin hfa strattera cost of cialis per pill walmart retin-a exigencies brunt dosage http://themusicianschoice.net/cialis-black/ cialis black costco http://elegantearthatthearbor.com/drugs/imigran/ canada imigran https://oregonclinic.org/zanaflex/ zanaflex for pain management http://takara-ramen.com/drugs/fluticasone/ fluticasone best price http://worldfinancenetwork.com/ventolin/ buy ventolin inhaler https://momshealthadvice.com/strattera/ buy strattera online http://deweyandridgeway.com/cialis-20-mg-lowest-price/ bestellen_cialis_generika https://socru.org/retin-a/ retin-a cream concerned, solid, colour?

    Reply
  2. can you buy doxycycline over the counter usa

    Reply
  3. cbd gummies cbd vape buy hemp
    cbd oil online hemp cbd

    Reply
  4. buy hemp cbd online cbd oil online
    buy cbd oil online

    Reply
  5. Liver ktx.zazf.surest.cn.vpn.wf thoracoscopically seminoma ascitic [URL=http://deweyandridgeway.com/amoxicillin-500mg/ - amoxicillin 500mg[/URL - [URL=http://alwaseetgulf.com/karela/ - karela[/URL - [URL=http://meetatsonoma.com/drug/cialis-36-hr/ - cialis 36 hr[/URL - [URL=http://telugustoday.com/drugs/soft-tab-ed-pack/ - cost of soft tab ed pack tablets[/URL - [URL=http://aestheticio.com/super-p-force-in-usa/ - super p force[/URL - super p force in usa [URL=http://outdooradvertisingusa.com/ketotifen/ - ketotifen from india[/URL - [URL=http://getfreshsd.com/viagra-buy-in-canada/ - viagra buy in canada[/URL - [URL=http://aquaticaonbayshore.com/doxycycline-100mg/ - buy doxycycline[/URL - older flaps amoxil storage amoxil trimox generic amoxicillin karela canada cialis levitra buy soft tab ed pack super p force canadian pharmacy ketotifen viagra buy in canada viagra pills online doxycycline 100mg tubular, http://deweyandridgeway.com/amoxicillin-500mg/ buy amoxicillin 500mg capsules http://alwaseetgulf.com/karela/ karela http://meetatsonoma.com/drug/cialis-36-hr/ cialis can it be taken daily http://telugustoday.com/drugs/soft-tab-ed-pack/ purchase soft tab ed pack http://aestheticio.com/super-p-force-in-usa/ generic super p force from india super p force capsules for sale http://outdooradvertisingusa.com/ketotifen/ buy ketotifen w not prescription http://getfreshsd.com/viagra-buy-in-canada/ lowest price viagra 100mg www.viagra.com http://aquaticaonbayshore.com/doxycycline-100mg/ buy doxycycline conventional duvets organelles, proctoscopy.

    Reply
赣ICP备17004055号-2