github / gitee 图床 ,使用golang(Gin)实现

Overview

repo-image-hosting 🐽

Github / Gitee 图床工具 (基于 Golang(Gin) 实现) github地址

还是用Gitee当图床算了,不然哪里有国内访问又快又免费又稳的图床服务提供......
Github 也行,可以用jsdelivr加速

页面

功能

  • 支持使用 Github / Gitee 作为图床工具
  • github 使用 jsdelivr 加速
  • 支持gitee图片大于1M的显示(PS:需要手动启动/部署gitee的pages服务)
  • 一键启动,跨平台支持,运行只依赖编译后的二进制文件
  • 可视化web操作界面(PS: 页面有点丑,不影响操作......)
  • 多图上传,支持 'jpeg', 'jpg', 'gif', 'png' 格式
  • 复制图片url 、删除图片

使用

用户可直接下载 releases 文件启动即可,参数说明:

./repo-image-hosting_windows_amd64.exe -h
Usage of D:\phpstudy_pro\WWW\org\gitee-image-hosting\repo-image-hosting_windows_amd64.exe:
  -owner string
        仓库所属空间地址(企业、组织或个人的地址path) (default "hezhizheng")
  -path string
        文件的路径 (default "image-hosting")
  -platform string
        平台名称,支持gitee/github (default "github")
  -port string
        本地监听的端口 (default "2047")
  -repo string
        仓库路径(path) (default "static-image-hosting")
  -token string
        Gitee/Github 的用户授权码
完整启动命令: ./repo-image-hosting_windows_amd64.exe -platform github -owner hezhizheng -repo static-image-hosting -path image-hosting -token xxxtoken -port 2047
实际参数替换成自己的就行

token获取(gitee):https://gitee.com/profile/personal_access_tokens/new

token获取(github):https://github.com/settings/tokens/new

自行编译

// 编译前请先安装 go-bindata ,请参考 https://blog.hi917.com/detail/87.html
// 执行静态资源编译命令(每次修改静态文件都需要执行)
go-bindata -o=bindata/bindata.go -pkg=bindata ./static/... ./views/... 

// 跨平台编译
gox -osarch="windows/amd64" -ldflags "-s -w"

gox -osarch="darwin/amd64" -ldflags "-s -w"

gox -osarch="linux/amd64" -ldflags "-s -w"

关于Gitee限制图片大于1M访问的处理方案

  • 使用第三方图片压缩工具进行压缩,之后再进行上传。推荐 compressjpeg
  • 启用Gitee的pages功能(非付费用户上传图片之后需要手动进行pages服务的部署),程序会自动替换pages域名进行图片的展示。

License

MIT

Releases(v0.1.1)
Owner
Dexter Ho
Better late than never.
Dexter Ho
Drone plugin to create comment and label in PR to Gitee

drone-plugin-gitee-pulls 中文文档 Drone plugin to create comment and label in PR to

kit101 2 Jun 28, 2022
Gin-errorhandling - Gin Error Handling Middleware is a middleware for the popular Gin framework

Gin Error Handling Middleware Gin Error Handling Middleware is a middleware for

Joseph Woodward 5 Jun 12, 2022
gin auto binding,grpc, and annotated route,gin 注解路由, grpc,自动参数绑定工具

中文文档 Automatic parameter binding base on go-gin doc Golang gin automatic parameter binding Support for RPC automatic mapping Support object registrati

xxj 226 Jun 30, 2022
Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.

Gin Web Framework Gin is a web framework written in Go (Golang). It features a martini-like API with performance that is up to 40 times faster thanks

Gin-Gonic 60.5k Jun 27, 2022
Gin best practices, gin development scaffolding, too late to explain, get on the bus.

Table of Contents generated with DocToc gin_scaffold 现在开始 文件分层 log / redis / mysql / http.client 常用方法 swagger文档生成 gin_scaffold Gin best practices, gin

niuyufu 510 Jun 19, 2022
gin-gonic/gin metrics for prometheus.

gin-metrics gin-gonic/gin metrics exporter for Prometheus. 中文 Introduction gin-metrics defines some metrics for gin http-server. There have easy way t

Pelen 103 Jun 21, 2022
cyhone 102 Jun 22, 2022
Swagger + Gin = SwaGin, a web framework based on Gin and Swagger

Swagger + Gin = SwaGin Introduction SwaGin is a web framework based on Gin and Swagger, which wraps Gin and provides built-in swagger api docs and req

long2ice 50 Jun 30, 2022
Swagger + Gin = SwaGin, a web framework based on Gin and Swagger

Swagger + Gin = SwaGin Introduction SwaGin is a web framework based on Gin and Swagger, which wraps Gin and provides built-in swagger api docs and req

long2ice 49 Jun 24, 2022
A single sign-on solution based on go-oauth2 / oauth2 and gin-gonic/gin

A single sign-on solution based on go-oauth2 / oauth2 and gin-gonic/gin

yinhuanyi 1 Nov 17, 2021
Go (Golang) API REST with Gin FrameworkGo (Golang) API REST with Gin Framework

go-rest-api-aml-service Go (Golang) API REST with Gin Framework 1. Project Description Build REST APIs to support AML service with the support of exte

Tony Aizize 1 Nov 21, 2021
Simple to do list API with Gin and Gorm (with Postgres)Simple to do list API with Gin and Gorm (with Postgres)

go-todo Simple to do list API with Gin and Gorm (with Postgres) Docker Clone this repository and run: docker-compose up You can then hit the followin

ansh-dev 2 Apr 28, 2022
Gin-boilerplate - This repository contains boilerplate code of a REST service using Gin (golang) framework.

Boilerplate REST service using Gin web framework (golang) Introduction This repository contains a boilerplate REST API service using Gin web framework

null 6 Apr 28, 2022
Gin-easy-todo - golang 의 RESTful API 프레임워크 gin 을 활용해 아주 간단한 Todo 애플리케이션을 만들어보자.

목차 1. 요약 2. 목표 3. API 목록 4. 프로젝트 구조 5. 패키지 별 기능과 관계 6. 사전 작업 6.1. DB, Table 생성 6.2. 모듈 생성 6.3. 패키지 다운로드 7. Gin 작성 7.1. 데이터베이스 설정 7.2. 테이블, 스키마 정의 7.3.

jongbae_park 0 Jan 2, 2022
Go-service-gin - Simple Web api application developed in Golang and Gin

Simple Web api application developed in Golang and Gin Initial Tutorial URL http

Nurul Huda Robin 0 Jan 4, 2022
Go-gin-ddd-cqrs - Clean api rest with Go, Gin and GORM

GOLANG API REST Clean api rest with Go, Gin and GORM. Clean Architecture with DD

Juan Cantón Rodríguez 10 May 28, 2022
Gin-cache - Gin cache middleware with golang

Gin-cache - Gin cache middleware with golang

Anson 38 Mar 16, 2022
Go-gin-mongo-api - A backend RESTful API built using golang, gin and mongoDB

go-gin-mongo-API This is a RESTful backend API which is developed using the gola

Humbe Jeffrey 4 Jun 24, 2022
Gin-boilerplate - Gin boilerplate preconfigured with basic rest api features

Gin Boilerplate Build apis with gin faster with this template Features Validatio

Mohan barman 4 Jun 24, 2022
Go-github-actions - `go-github-actions` is a package for developing GitHub Actions

go-github-actions go-github-actions is a package for developing GitHub Actions.

Ken’ichiro Oyama 1 Feb 6, 2022
Package githubv4 is a client library for accessing GitHub GraphQL API v4 (https://developer.github.com/v4/).

githubv4 Package githubv4 is a client library for accessing GitHub GraphQL API v4 (https://docs.github.com/en/graphql). If you're looking for a client

null 893 Jun 23, 2022
Google 29 May 25, 2021
GitOops is a tool to help attackers and defenders identify lateral movement and privilege escalation paths in GitHub organizations by abusing CI/CD pipelines and GitHub access controls.

GitOops is a tool to help attackers and defenders identify lateral movement and privilege escalation paths in GitHub organizations by abusing CI/CD pipelines and GitHub access controls.

OVO Technology 591 Jun 21, 2022
A tool to solve DNS pollution of GitHub website. Query the real IP address of domain names such as github.com, and refresh the domain name setting of the system hosts file.

githubDNS Target A tool to solve DNS pollution of GitHub website. Query the real IP address of domain names such as github.com, and refresh the domain

null 0 Oct 14, 2021
GitHub CLI extension to preview your markdown similar to the style of GitHub.

gh markdown-preview GitHub CLI extension to preview your markdown similar to the style of GitHub gh markdown-preview is a GitHub CLI extension to prev

Yusuke Wada 122 Jul 1, 2022
github-actions-merger is github actions that merges pull request with commit message including pull request labels.

github-actions-merger github-actions-merger is github actions that merges pull request with commit message including pull request labels. Usage Write

ABEMA 6 Jun 14, 2022
A simple Go app and GitHub workflow that shows how to use GitHub Actions to test, build and deploy a Go app to Docker Hub

go-pipeline-demo A repository containing a simple Go app and GitHub workflow that shows how to use GitHub Actions to test, build and deploy a Go app t

Marat Bogatyrev 0 Nov 17, 2021
Utility to generate tokens to interact with GitHub API via GitHub App integration

GitHub App Authentication for integration with GitHub Introduction GitHub Apps are the officially recommended way to integrate with GitHub because of

GitHub Advanced Security 2 Mar 16, 2022
Impersonate Your GitHub App In A GitHub Action

Impersonate Your GitHub App In A GitHub Action This action helps you retrieve an authenticated app token with a GitHub app id and a app private key. Y

null 1 Nov 29, 2021