Skip to content

Commit 71e271f

Browse files
committed
0.13.1
新增Filebase提供的IPFS-S3接口对接
1 parent 1397ace commit 71e271f

File tree

3 files changed

+11
-93
lines changed

3 files changed

+11
-93
lines changed

cloudflare-worker-js-api/API_IMG_IPFS-S3filebase.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
接口来自 https://docs.filebase.com/ipfs-pinning/pinning-files#using-the-s3-compatible-api
3+
注册免费账号即可,无需信用卡手机号,支持免费PLAN,包括1000文件数和5GB空间,平均5MB足够使用
4+
管理时也可以直接用Alist等S3对接实现
5+
本JS实现了在Cloudflare Worker中使用Filebase的S3 API上传文件到IPFS存储桶并返回IPFS CID以制作URL
6+
需要的KV库是的名字是WORKER_IMGBED,KV库的内容是JSON格式的配置,包括accessKey、secretKey和bucket
7+
bucket是存储桶名(自定义),accessKey和secretKey是Filebase的S3 API的凭证(随机分配,来自 https://console.filebase.com/keys 的key和Secret
8+
*/
9+
110
async function handles3filebaseRequest(request) {
211
if (request.method !== 'POST' || !request.headers.get('Content-Type').includes('multipart/form-data')) {
312
return new Response('Invalid request', { status: 400 });

cloudflare-worker-js-api/API_IMG_s3filebase.js

Lines changed: 0 additions & 92 deletions
This file was deleted.

docs/History.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@
1818
- 20241014 新增 AliEx对接,来自 https://jike.info/topic/36748/ ; 另外发现10086图床对CF IP进行了封禁 error "您的IP已被封禁,请联系管理员" ; 新增JDKF对接,来自即刻图床插件
1919
- 20241029 移除了几个不支持的,新增了一个图片Test页面 https://imgup.pages.dev/tools/test
2020
- 20241105 新增MTDP对接,来自 https://www.nodeseek.com/post-188355-1
21-
- 20241118 新增3001对接,需要自备账号cookie,参考旧的3001imgjs,移除了jdkf、vviptuangou、da8m、mtdp等几个不可用的/防盗链的前端接口
21+
- 20241118 新增3001对接,需要自备账号cookie,参考旧的3001imgjs,移除了jdkf、vviptuangou、da8m、mtdp等几个不可用的/防盗链的前端接口
22+
- 20250120 新增Filebase提供的IPFS-S3接口对接,官网直接免费注册即可,20250120时每个账号支持1000文件数&5GB空间的限制

0 commit comments

Comments
 (0)