Giter VIP home page Giter VIP logo

telegraph-image's Introduction

telegraph-Image

提醒:同一张照片或视频,会生成两个连接,分别是https://yourdomain.com/file/yourfilename.pnghttps://telegr.ph/file/yourfilename.png。两个连接的文件名是相同的。后台管理中的图片,只显示自己图床域名的连接地址,此时可以将https://yourdomain.com/file/替换为https://telegr.ph/file/,即可获得另一个地址。

开发计划

  • 后台管理
  • 鉴黄
  • 画廊
  • referer、IP黑名单

优点

  1. 无限图片储存数量,你可以上传不限数量的图片

  2. 无需购买服务器,托管于Cloudflare的网络上,当使用量不超过Cloudflare的免费额度时,完全免费

  3. 无需购买域名,可以使用Cloudflare Pages提供的*.pages.dev的免费二级域名,同时也支持绑定自定义域名

  4. 支持图片审查API,可根据需要开启,开启后不良图片将自动屏蔽,不再加载

  5. 支持后台图片管理,日志管理,查看访问前20的Referer、IP、img,可以对上传的图片进行在线预览,添加白名单,黑名单等操作

更新日志

  • 2023-8-21 : 支持自建鉴黄api

  • 2023-8-13 :图片访问日志,数据库表已修改 更新时请先删除表imginfo重新创建

  • 2023-8-12 :图片管理功能

利用Cloudflare pages部署

  1. 在你的Github中Fork this project,并完成仓库的新建。(在原作基础上作了部分修改:注释掉telegraph-Image/cf_58duihuan.js中https://api.weixinyanxuan.com/mall/api/img/upload相关代码,即注释掉第109-127行)。

  2. 登录到Cloudflare控制台.

  3. 在帐户主页中,选择pages> Create a project > Connect to Git

  4. 选择你创建的项目存储库,在Set up builds and deployments部分中,全部默认即可。

  1. 点击Save and Deploy部署,然后点Continue to project即可看到访问域名

访问http(s)://你的pages.dev域名/admin 即可打开后台管理页面

访问http(s)://你的pages.dev域名/list 即可打开log管理页面

如果想通过自定义域名访问图床,在Cloudflare pages项目选择自定义域名进行设置即可。

后台管理仅具备基本功能;默认关闭后台登录加密服务,可以开启登录加密服务。

教程参考: 开启图片管理功能教程



利用vercel部署(vercel分支)

Deploy with Vercel


自定义cdn加速

默认是使用cloudflare ,修改 asset/js/upload.js#L219 即可

  • 如用cachefly加速

cachefly绑定cloudflare pages

修改代码

- const PROXYURL = ""  //自定义加速域名 默认是使用cloudflare
+ const PROXYURL = "https://xxxxxxxxxx.cachefly.net"  //自定义加速域名 默认是使用cloudflare

感谢

@cf-pages

@likebeta

telegraph-image's People

Contributors

x-dr avatar igengdu 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.