Coder Social home page Coder Social logo

cnbattle / upcloud Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 2.0 947 KB

上传前端项目到CDN平台及自动刷新节点缓存的工具, 支持腾讯云,七牛云,阿里云

License: Other

Makefile 20.37% Go 79.63%
upcloud tencent-cloud qiniuyun aliyun

upcloud's Introduction

upcloud

Build Status LICENSE

上传前端项目到CDN平台及自动刷新节点缓存的工具

USE

  1. 下载对于平台可执行文件,放置到系统PATH目录下, 或
go get -u github.com/cnbattle/upcloud
  1. 根据使用的对象存储平台创建配置 .upcloud.env 文件, 具体参考下面示例

TODO

功能

  • 多线程上传

多平台

  • 腾讯云
  • 七牛云
  • 阿里云

各平台.upcloud.env配置示例

  • UP_CLOUD_PLATFORM: 平台
  • UP_CLOUD_PATH: 需上传静态资源路径
  • UP_CLOUD_POOL_SIZE: 上传时的并发数,默认为10
  • UP_CLOUD_PREFETCH_URLS: 上传完成,要刷新缓存的链接,VUE React等静态站点一般刷新首页index.html即可

腾讯云 COS

UP_CLOUD_PLATFORM=tencent
UP_CLOUD_PATH=dist/
UP_CLOUD_POOL_SIZE=10
UP_CLOUD_PREFETCH_URLS=your prefetch urls (多个用,分割)

UP_CLOUD_SECRET_ID=your id 
UP_CLOUD_SECRET_KEY=your key
UP_CLOUD_VISIT_NODE=your visis node

七牛云

UP_CLOUD_PLATFORM=qiniu
UP_CLOUD_PATH=dist/
UP_CLOUD_POOL_SIZE=10
UP_CLOUD_PREFETCH_URLS=your prefetch urls (多个用,分割)

UP_CLOUD_ACCESS_KEY=your access key
UP_CLOUD_SECRET_KEY=your secret key
UP_CLOUD_BUCKET=your bucket

阿里云

UP_CLOUD_PLATFORM=aliyun
UP_CLOUD_PATH=dist/
UP_CLOUD_POOL_SIZE=10
UP_CLOUD_PREFETCH_URLS=your prefetch urls (多个用,分割)

UP_CLOUD_ENDPOINT=your endpoint
UP_CLOUD_ACCESS_KEY_ID=your access key id
UP_CLOUD_ACCESS_KEY_SECRET=your access key secret
UP_CLOUD_BUCKET=your bucket

upcloud's People

Contributors

cnbattle avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

upcloud's Issues

七牛上传有概率丢失(少上传)文件

七牛好像限制了并发上传,不能同时上传太多文件,配置文件里并发数量高的时候丢失率也高。
并发数量改成 1 的时候还是会有丢失的情况。
上传的时候 sleep 半秒试试?最近比较忙,暂时没时间提 PR 了,等我有时间仔细研究一下。

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.