Code Monkey home page Code Monkey logo

tgstate's Introduction

tgState

English

一款以Telegram作为储存的文件外链系统

不限制文件大小和格式

可以作为telegram图床,也可以作为telegram网盘使用。

支持web上传文件和telegram直接上传

搭配CLoudFlare使用:https://www.csz.net/proj/tgstate/

如有疑惑,可以咨询TG @tgstate123

演示

https://tgstate.vercel.app / https://tgstate.ikun123.com/

搭建在vercel,资源限制,大于5MB的文件不支持

演示图片:

tgState

参数说明

必填参数

  • target
  • token

可选参数

  • pass
  • mode
  • url
  • port

target

目标可为频道、群组、个人

当目标为频道时,需要将Bot拉入频道作为管理员,公开频道并自定义频道Link,target值填写Link,如@xxxx

当目标为群组时,需要将Bot拉入群组,公开群组并自定义群组Link,target值填写Link,如@xxxx

当目标为个人时,则为telegram id(@getmyid_bot获取)

token

填写你的bot token

pass

填写访问密码,如不需要,直接填写none即可

mode

  • p 代表网盘模式运行,不限制上传后缀
  • m 在p模式的基础上关闭网页上传,可私聊进行上传(如果target是个人,则只支持指定用户进行私聊上传

url

bot获取FileID的前置域名地址自动补充

port

自定义运行端口

管理

获取FIleID

对bot聊天中的文件引用并回复get可以获取FileID,搭建地址+获取的path即可访问资源

如果配置了url参数,会直接返回完整的地址

image

部署

二进制

Linux amd64下载

wget https://github.com/csznet/tgState/releases/latest/download/tgState.zip && unzip tgState.zip && rm tgState.zip

Linux arm64下载

wget https://github.com/csznet/tgState/releases/latest/download/tgState_arm64.zip && unzip tgState_arm64.zip && rm tgState_arm64.zip

使用方法

 ./tgState 参数

例子

 ./tgState -token xxxx -target @xxxx

后台运行

nohup ./tgState 参数 &

Docker

pull镜像

docker pull csznet/tgstate:latest

启动

docker run -d -p 8088:8088 --name tgstate 参数 --net=host csznet/tgstate:latest

其中docker的参数需要设置为环境变量

例子

docker run -d -p 8088:8088 --name tgstate -e token=aaa -e target=@bbb --net=host csznet/tgstate:latest

Vercel

不支持大于5mb文件,不支持tg获取文件路径

点我传送至Vercel配置页面

API说明

POST方法到路径/api

表单传输,字段名为image,内容为二进制数据

tgstate's People

Contributors

anglesgirl 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.