Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
cf-pages committed Jan 18, 2023
1 parent bce0cd1 commit 139945d
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 87 deletions.
58 changes: 58 additions & 0 deletions README-EN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Telegraph-Image
Free Image Hosting solution, Flickr/imgur alternative. Using Cloudflare Pages and Telegraph.

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

## Deployment

### Preparation
The only thing you need to prepare in advance is a Cloudflare account

### Step by Step Instruction
3 simple steps to deploy this project and have your own image hosting

1.Download or fork this repository (Note: Please use fork at this time, there is some issue when using download #14)

2.Open the Cloudflare Dashboard, enter the Pages management page, choose to create a project, if the choice in the first step is fork this repository, then choose`Connecting to the Git Provider`,if you chose to download this repository in the first step, select`Direct Upload`
![1](https://telegraph-image.pages.dev/file/8d4ef9b7761a25821d9c2.png)

3. Follow the prompts on the page to enter the project name, select the git repository you need to connect to (the first step is to choose fork) or upload the repository file you just downloaded (the first step is to choose download this repository), click`Deploy`

## Features
1. Unlimited number of images stored, you can upload an unlimited number of images

2. No need to buy a server, hosted on Cloudflare's network, when the use does not exceed Cloudflare's free quota, completely free

3. No need to buy a domain name, you can use the free second-level domain name `*.pages.dev` provided by Cloudflare Pages, and also support binding custom domain names

4. Support image review API, can be opened as needed, after opening undesirable images will be automatically blocked, no longer loaded

### Add custom domains
Inside the custom domain of pages, bind the domain name that exists in your Cloudflare account, the domain name hosted in cloudflare, will automatically modify the dns record
![2](https://telegraph-image.pages.dev/file/29546e3a7465a01281ee2.png)

### Setup image review API
1. Please go to https://moderatecontent.com/ to register and get a free API key for reviewing image content

2. Open the settings of Cloudflare Pages, click `Settings`, `Environment Variables`, `Add Environment Variables` in turn

3. Add a `variable` name as `ModerateContentApiKey`, `value` as the `API key` you just got in the first step, click `Save` to

Note: Since the changes will take effect on the next deployment, you may need to go to the `Deploy` page and redeploy the project

When image review is enabled, the first time image load will be slow because it takes time to review, but the subsequent image load will not be affected due to the existence of cache
![3](https://tpic.pages.dev/file/bae511fb116b034ef9c14.png)

### Limitations
1. Since the image files are actually stored in Telegraph, Telegraph limits the size of uploaded images to a maximum of 5MB

2. Due to the use of Cloudflare's network, the loading speed of images may not be guaranteed in some areas.

3. The free version of Cloudflare Function is limited to 100,000 requests per day (i.e. the total number of uploads or loads of images cannot exceed 100,000), if this is exceeded, you may need to choose to purchase the paid package of Cloudflare Function.

### Thanks
Ideas and code provided by Hostloc @feixiang and @乌拉擦




58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
# Telegraph-Image
Free Image Hosting solution, Flickr/imgur alternative. Using Cloudflare Pages and Telegraph.
免费图片托管解决方案,Flickr/imgur替代品。使用Cloudflare页面和Telegraph。

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

## Deployment
## 如何部署

### Preparation
The only thing you need to prepare in advance is a Cloudflare account
### 提前准备
你唯一需要提前准备的就是一个Cloudflare账户

### Step by Step Instruction
3 simple steps to deploy this project and have your own image hosting
### 手把手教程
简单3步,即可部署本项目,拥有自己的图床

1.Download or fork this repository (Note: Please use fork at this time, there is some issue when using download #14)
1.下载或是Fork本仓库 ~~(Fork的时候如果能顺手点下旁边的Star就更好了❤)~~

2.Open the Cloudflare Dashboard, enter the Pages management page, choose to create a project, if the choice in the first step is fork this repository, then choose`Connecting to the Git Provider`,if you chose to download this repository in the first step, select`Direct Upload`
2.打开Cloudflare Dashboard,进入Pages管理页面,选择创建项目,如果在第一步中选择的是fork本仓库,则选择`连接到 Git 提供程序`,如果第一步中选择的是下载本仓库则选择`直接上传`
![1](https://telegraph-image.pages.dev/file/8d4ef9b7761a25821d9c2.png)

3. Follow the prompts on the page to enter the project name, select the git repository you need to connect to (the first step is to choose fork) or upload the repository file you just downloaded (the first step is to choose download this repository), click`Deploy`
3. 按照页面提示输入项目名称,选择需要连接的git仓库(第一步选择的是fork)或是上传刚刚下载的仓库文件(第一步选择的是下载本仓库),点击`部署站点`即可完成部署

## Features
1. Unlimited number of images stored, you can upload an unlimited number of images
## 特性
1.无限图片储存数量,你可以上传不限数量的图片

2. No need to buy a server, hosted on Cloudflare's network, when the use does not exceed Cloudflare's free quota, completely free
2.无需购买服务器,托管于Cloudflare的网络上,当使用量不超过Cloudflare的免费额度时,完全免费

3. No need to buy a domain name, you can use the free second-level domain name `*.pages.dev` provided by Cloudflare Pages, and also support binding custom domain names
3.无需购买域名,可以使用Cloudflare Pages提供的`*.pages.dev`的免费二级域名,同时也支持绑定自定义域名

4. Support image review API, can be opened as needed, after opening undesirable images will be automatically blocked, no longer loaded
4.支持图片审查API,可根据需要开启,开启后不良图片将自动屏蔽,不再加载

### Add custom domains
Inside the custom domain of pages, bind the domain name that exists in your Cloudflare account, the domain name hosted in cloudflare, will automatically modify the dns record
### 绑定自定义域名
在pages的自定义域里面,绑定cloudflare中存在的域名,在cloudflare托管的域名,自动会修改dns记录
![2](https://telegraph-image.pages.dev/file/29546e3a7465a01281ee2.png)

### Setup image review API
1. Please go to https://moderatecontent.com/ to register and get a free API key for reviewing image content
### 开启图片审查
1.请前往https://moderatecontent.com/ 注册并获得一个免费的用于审查图像内容的API key

2. Open the settings of Cloudflare Pages, click `Settings`, `Environment Variables`, `Add Environment Variables` in turn
2.打开Cloudflare Pages的管理页面,依次点击`设置``环境变量``添加环境变量`

3. Add a `variable` name as `ModerateContentApiKey`, `value` as the `API key` you just got in the first step, click `Save` to
3.添加一个`变量名称``ModerateContentApiKey```为你刚刚第一步获得的`API key`,点击`保存`即可

Note: Since the changes will take effect on the next deployment, you may need to go to the `Deploy` page and redeploy the project
注意:由于所做的更改将在下次部署时生效,你或许还需要进入`部署`页面,重新部署一下该本项目

When image review is enabled, the first time image load will be slow because it takes time to review, but the subsequent image load will not be affected due to the existence of cache
开启图片审查后,因为审查需要时间,首次的图片加载将会变得缓慢,之后的图片加载由于存在缓存,并不会受到影响
![3](https://tpic.pages.dev/file/bae511fb116b034ef9c14.png)

### Limitations
1. Since the image files are actually stored in Telegraph, Telegraph limits the size of uploaded images to a maximum of 5MB
### 限制
1.由于图片文件实际存储于Telegraph,Telegraph限制上传的图片大小最大为5MB

2. Due to the use of Cloudflare's network, the loading speed of images may not be guaranteed in some areas.
2.由于使用Cloudflare的网络,图片的加载速度在某些地区可能得不到保证

3. The free version of Cloudflare Function is limited to 100,000 requests per day (i.e. the total number of uploads or loads of images cannot exceed 100,000), if this is exceeded, you may need to choose to purchase the paid package of Cloudflare Function.
3.Cloudflare Function免费版每日限制100,000个请求(即上传或是加载图片的总次数不能超过100,000次)如超过可能需要选择购买Cloudflare Function的付费套餐

### Thanks
Ideas and code provided by Hostloc @feixiang and @乌拉擦
### 感谢
Hostloc @feixiang@乌拉擦 提供的思路和代码



Expand Down
58 changes: 0 additions & 58 deletions readme-zh.md

This file was deleted.

0 comments on commit 139945d

Please sign in to comment.