GithubHelp home page GithubHelp logo

awesome-archive / qcloud-cos-mweb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scue/qcloud-cos-mweb

0.0 1.0 0.0 2.48 MB

一个使得MWeb支持直接上传文件至腾讯云的服务器

Go 94.07% Shell 5.93%

qcloud-cos-mweb's Introduction

简介

这是一个使得MWeb支持直接上传文件至腾讯云的服务器。

背景

由于平时使用MWeb来写博客,发现使用腾讯云来上传文件没有相应的方式,并且官方提供的API文档似乎不能直接应用到MWeb上。

于是自己动手搞了一下这个专门用来上传图片至腾讯云的本地中转服务器。

使用方法

  • 先按照 https://github.com/tencentyun/coscmd 安装好coscmd
  • 通过coscmd config -a <secret_id> -s <secret_key> -b <bucket> -r <region> 写好配置文件 ~/.cos.conf
  • 检查配置文件~/.cos.conf是否已配置OK
  • 克隆此项目至本地,然后启动qcloud-cos-upload
  • 帮助文档
./qcloud-cos-upload -help
Usage of ./qcloud-cos-upload:
  -cosdir string
        COS目录 (default "/blog/")
  -help
        显示帮助
  -http string
        监听地址 (default "127.0.0.1:8016")
  -tmp string
        临时目录 (default "/tmp/qcloud-cos-tmpdir")

提示:若您使用了anaconda3安装多个Python环境,run.sh或许对你有帮助~

开发者

  • 源码:有且只有一个文件main.go,一看便知~

  • 编译:go build -o qcloud-cos-upload .

程序截图

后台运行?

由于刚刚从Node.js转入Golang,我这边直接使用pm2来管理后台程序,还蛮好用

  • 启动:pm2 start --name qcloud-cos-mweb ./run.sh
  • 停止:pm2 stop qcloud-cos-mweb
  • 删除:pm2 delete qcloud-cos-mweb
  • 状态:pm2 status

相比于Node.js开发的SinaWeiboPictureBed,可以清楚看到,Golang开发的程序似乎内存占用好小~

qcloud-cos-mweb's People

Contributors

scue avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.