Skip to content

Commit

Permalink
0.13.1
Browse files Browse the repository at this point in the history
 新增Filebase提供的IPFS-S3接口对接
  • Loading branch information
BlueSkyXN committed Jan 20, 2025
1 parent 1397ace commit 71e271f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 93 deletions.
9 changes: 9 additions & 0 deletions cloudflare-worker-js-api/API_IMG_IPFS-S3filebase.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
接口来自 https://docs.filebase.com/ipfs-pinning/pinning-files#using-the-s3-compatible-api
注册免费账号即可,无需信用卡手机号,支持免费PLAN,包括1000文件数和5GB空间,平均5MB足够使用
管理时也可以直接用Alist等S3对接实现
本JS实现了在Cloudflare Worker中使用Filebase的S3 API上传文件到IPFS存储桶并返回IPFS CID以制作URL
需要的KV库是的名字是WORKER_IMGBED,KV库的内容是JSON格式的配置,包括accessKey、secretKey和bucket
bucket是存储桶名(自定义),accessKey和secretKey是Filebase的S3 API的凭证(随机分配,来自 https://console.filebase.com/keys 的key和Secret
*/

async function handles3filebaseRequest(request) {
if (request.method !== 'POST' || !request.headers.get('Content-Type').includes('multipart/form-data')) {
return new Response('Invalid request', { status: 400 });
Expand Down
92 changes: 0 additions & 92 deletions cloudflare-worker-js-api/API_IMG_s3filebase.js

This file was deleted.

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

0 comments on commit 71e271f

Please sign in to comment.