GithubHelp home page GithubHelp logo

lonisletend / cospic Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 889 KB

CosPic是一个Linux下基于cos-cpp-sdk-v5开发的图片上传工具,一键上传图片至腾讯云对象存储COS。

License: MIT License

CMake 3.01% C 1.96% C++ 79.06% Makefile 14.04% Shell 0.09% HTML 0.94% CSS 0.76% Python 0.14%

cospic's Introduction

CosPic简介

CosPic是一个Linux下基于cos-cpp-sdk-v5开发的图片上传工具,如果你使用腾讯云对象存储COS的bucket做图床,那么可以使用CosPic一键上传图片至COS并获取相应的链接,目前提供生成URL,HTML以及Markdown格式直接复制使用,让你写博客时更加方便。

PS: 目前只有简单的上传功能,还有很多不完善之处,使用前请仔细阅读注意事项,以免对您造成损失。

CosPic使用

  1. 编译生成cospic可执行文件(build目录中有已经编译好的)

  2. 配置文件config.json,格式如下:

    { "SecretId":"×××××××××××××××××××××××××××××××", "SecretKey":"××××××××××××××××××××××××××××××", "Region":"ap-beijing", "SignExpiredTime":360, "ConnectTimeoutInms":6000, "ReceiveTimeoutInms":5000, "AsynThreadPoolSize":2, "UploadPartSize":10485760, "UploadCopyPartSize":10485760, "UploadThreadPoolSize":5, "LogoutType":1, "LogLevel":3, "DownloadThreadPoolSize":5, "DownloadSliceSize":4194304 }

    SecretId, SecretKey字段需要自行填入,其他默认就好。

  3. bucket.txt, 配置bucket存储桶,格式如下:

    test-1234567890

  4. 终端运行./cospic。

  5. 拖动图片到终端,点击并回车。

  6. 等待上传(基本不用等^_^),复制需要的链接。

注意事项

  • 目前仅提供图片直接上传到bucket,不支持文件夹管理等。
  • 目前没有处理上传图片与bucket中存在图片重名情况,可能会覆盖。

编译环境

编译环境配置参考cos-cpp-sdk-v5 README.md。

cospic's People

Contributors

lonisletend avatar

Stargazers

Liam avatar domainbank avatar  avatar  avatar  avatar

Watchers

James Cloos avatar

Forkers

xsdiewl

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.