Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

后台优化(批量上传/适配移动端/样式优化) #201

Merged
merged 111 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
5c7f48a
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
0d34046
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
f4aceb2
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
ce99125
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
36637c4
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
afa2cd7
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
f606e98
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
3abb3dc
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
8f66979
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
4e659dd
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
7e98b1e
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
4962a5c
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
de9bb8b
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
14e91bf
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
e7bfac3
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
218554b
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
c5540d7
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
183847e
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
f8f3f16
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
5ba19aa
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
a6a2cd6
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
9f396ca
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
9990d05
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
ebb75a0
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
b85b75d
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
27e63f1
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
29880e3
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
72d223f
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
8ed2e67
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
9cf935d
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
7e8ef24
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
1191843
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
669ccb0
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
3feeb74
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
be8a7ff
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
307470c
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
0c244f9
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
43e5d61
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
afb6132
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
2af330b
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
4ed55fc
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
7dce7bd
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
020da5f
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
c3dfecc
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
d825fe3
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
0f5ac94
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
1db6a70
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
526fc42
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
8d06a72
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
b359de3
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
2823dfe
Update admin-imgtc.html
DJChanahCJD Oct 20, 2024
746a6c2
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
db2bf5c
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
e0de289
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
167d4b9
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
b84564c
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
cf43ad0
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
98ca4d2
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
20f1b3d
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
3e6bc1f
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
fab0abd
improve upload
DJChanahCJD Oct 21, 2024
fe74d48
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
6d7e00a
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
b6c9bcc
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
4f7bc23
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
853f42a
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
fe97f70
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
787f70d
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
b3f0c35
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
ebb6649
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
7742e38
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
4521415
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
7f57958
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
9b42995
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
17362d0
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
0595049
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
dcc93f7
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
ce96d49
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
03d5059
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
cd1b4f1
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
974d94a
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
2273234
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
5d035e2
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
20cd5be
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
3dc8966
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
57660fb
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
3fe6d87
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
5bc1516
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
2bc0ecd
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
7e958b1
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
e7ee187
Update list.js
DJChanahCJD Oct 21, 2024
1ff185b
Update list.js
DJChanahCJD Oct 21, 2024
8e54256
Update list.js
DJChanahCJD Oct 21, 2024
9bea3d8
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
17c411b
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
aca4779
Update admin-imgtc.html
DJChanahCJD Oct 21, 2024
9066b8e
add like api
DJChanahCJD Oct 22, 2024
ac70f59
improve api and admin
DJChanahCJD Oct 22, 2024
4c5794e
Update admin-imgtc.html
DJChanahCJD Oct 22, 2024
bf27fbb
Update admin-imgtc.html
DJChanahCJD Oct 22, 2024
f2c8ce8
Update admin-imgtc.html
DJChanahCJD Oct 22, 2024
9a6a6f7
Update admin-imgtc.html
DJChanahCJD Oct 22, 2024
94730ef
Update admin-imgtc.html
DJChanahCJD Oct 22, 2024
d670976
Update admin-imgtc.html
DJChanahCJD Oct 22, 2024
5bfbbed
Update admin-imgtc.html
DJChanahCJD Oct 22, 2024
428139e
Update admin-imgtc.html
DJChanahCJD Oct 22, 2024
5fe9547
Update admin-imgtc.html
DJChanahCJD Oct 22, 2024
174c7cc
Refactor upload function and improve file handling (#183)
cf-pages Dec 1, 2024
cbf9b38
Merge branch 'main' of https://github.com/DJChanahCJD/ImgTG into DJCh…
cf-pages Dec 4, 2024
b308ba3
Merge branch 'DJChanahCJD-main'
cf-pages Dec 4, 2024
f8b2d8d
Update functions/api/manage/toggleLike/[id].js
cf-pages Dec 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ Free Image Hosting solution, Flickr/imgur alternative. Using Cloudflare Pages an

English|[中文](readme-zh.md)

Use tg channel/chat for storage

How to use?

First, you need to create a new telegram bot to obtain the token and a telegram channel to obtain Chat_ID
## How to Obtain `Bot_Token` and `Chat_ID` for Telegram

If you don't have a Telegram account yet, please create one first. Then, follow these steps to get the `Bot_Token` and `Chat_ID`:

1. **Get the `Bot_Token`**
- In Telegram, send the command `/newbot` to [@BotFather](https://t.me/BotFather), and follow the prompts to input your bot's name and username. Once successfully created, you will receive a `Bot_Token`, which is used to interact with the Telegram API.

2. **Set the bot as a channel administrator**
- Create a new channel and, after entering the channel, go to channel settings. Add the bot you just created as a channel administrator, so it can send messages.

3. **Get the `Chat_ID`**
- Use [@GetTheirIDBot](https://t.me/GetTheirIDBot) to get your channel ID. Send a message to this bot and follow the instructions to receive your `Chat_ID` (the ID of your channel).

## Deployment

### Preparation
Expand Down
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,38 @@

[English](README-EN.md)|中文

> [!IMPORTANT]
>
> 由于原有的Telegraph API接口被官方关闭,需要将上传渠道切换至Telegram Channel,请按照文档中的部署要求设置`TG_Bot_Token`和`TG_Chat_ID`,否则将无法正常使用上传功能。

## 如何获取Telegram的`Bot_Token`和`Chat_ID`

如果您还没有Telegram账户,请先创建一个。接着,按照以下步骤操作以获取`BOT_TOKEN`和`CHAT_ID`:

1. **获取`Bot_Token`**
- 在Telegram中,向[@BotFather](https://t.me/BotFather)发送命令`/newbot`,根据提示依次输入您的机器人名称和用户名。成功创建机器人后,您将会收到一个`BOT_TOKEN`,用于与Telegram API进行交互。

![202409071744569](https://github.com/user-attachments/assets/04f01289-205c-43e0-ba03-d9ab3465e349)

2. **设置机器人为频道管理员**
- 创建一个新的频道(Channel),进入该频道后,选择频道设置。将刚刚创建的机器人添加为频道管理员,这样机器人才能发送消息。

![202409071758534](https://github.com/user-attachments/assets/cedea4c7-8b31-42e0-98a1-8a72ff69528f)

![202409071758796](https://github.com/user-attachments/assets/16393802-17eb-4ae4-a758-f0fdb7aaebc4)


3. **获取`Chat_ID`**
- 通过[@VersaToolsBot](https://t.me/VersaToolsBot)获取您的频道ID。向该机器人发送消息,按照指示操作,最后您将得到`CHAT_ID`(即频道的ID)。
- 或者通过[@GetTheirIDBot](https://t.me/GetTheirIDBot)获取您的频道ID。向该机器人发送消息,按照指示操作,最后您将得到`CHAT_ID`(即频道的ID)。

![202409071751619](https://github.com/user-attachments/assets/59fe8b20-c969-4d13-8d46-e58c0e8b9e79)

最后去Cloudflare Pages后台设置相关的环境变量(注:修改环境变量后,需要重新部署才能生效)
| 环境变量 | 示例值 | 说明 |
|-----------------|---------------------------|----------------------------------------------------------------------------------------|
| `TG_Bot_Token` | `123468:AAxxxGKrn5` | 从[@BotFather](https://t.me/BotFather)获取的Telegram Bot Token。 |
| `TG_Chat_ID` | `-1234567` | 频道的ID,确保TG Bot是该频道或群组的管理员。 |

## 如何部署

Expand Down
Loading
Loading