mirror of
https://github.com/BlueSkyXN/WorkerJS_CloudFlare_ImageBed.git
synced 2024-11-16 11:42:33 +08:00
0.10.4
This commit is contained in:
parent
9e51aaad0e
commit
0f1a71baa1
|
@ -2,6 +2,13 @@ addEventListener('fetch', event => {
|
|||
event.respondWith(handleimg2ipfsRequest(event.request));
|
||||
});
|
||||
|
||||
/*
|
||||
接口来自 https://www.nodeseek.com/post-158028-1
|
||||
网友提供的免费IPFS上传接口
|
||||
然后配合公共网关即可
|
||||
另外建议配合使用 https://github.com/BlueSkyXN/WorkerJS_CloudFlare_ImageBed/blob/main/UserScript/ipfs-fix.js
|
||||
*/
|
||||
|
||||
async function handleimg2ipfsRequest(request) {
|
||||
console.log('Request received:', request.url);
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@ export default {
|
|||
};
|
||||
|
||||
/*
|
||||
参考了即刻图床开源的阿里接口 https://jike.info/topic/36748
|
||||
需要使用美国等地访问 https://www.aliexpress.com/ 并使用第三方直接注册和登录,比如谷歌,如果访问地异常则不会出现第三方登录
|
||||
该模块需要阿里国际账号,虽然不需要实名、可以随便注册但需要Cookie。有效期不清楚,有点像一个月。
|
||||
这个试验我放在了KV库理论上也可以用D1库,不用Env直接装载是因为Cookie有点长,大概3KB,而Env最大就5KB好像(对于免费用户)
|
||||
你需要创建和绑定名为 WORKER_IMGBED 的库,其中新建 K 字段,名为 ali_express_cookie 然后在V中复制进去浏览器F12得到的完整Cookie即可
|
||||
返回图片示例为 https://ae01.alicdn.com/kf 的域名
|
||||
参考了即刻图床开源的阿里接口 https://jike.info/topic/36748
|
||||
需要使用美国等地访问 https://www.aliexpress.com/ 并使用第三方直接注册和登录,比如谷歌,如果访问地异常则不会出现第三方登录
|
||||
该模块需要阿里国际账号,虽然不需要实名、可以随便注册但需要Cookie。有效期不清楚,有点像一个月。
|
||||
这个试验我放在了KV库理论上也可以用D1库,不用Env直接装载是因为Cookie有点长,大概3KB,而Env最大就5KB好像(对于免费用户)
|
||||
你需要创建和绑定名为 WORKER_IMGBED 的库,其中新建 K 字段,名为 ali_express_cookie 然后在V中复制进去浏览器F12得到的完整Cookie即可
|
||||
返回图片示例为 https://ae01.alicdn.com/kf 的域名
|
||||
*/
|
||||
|
||||
async function handleAliExpressRequest(request) {
|
||||
|
|
|
@ -2,6 +2,10 @@ addEventListener('fetch', event => {
|
|||
event.respondWith(handleDa8mRequest(event.request));
|
||||
});
|
||||
|
||||
/*
|
||||
接口来自 https://mlw10086.serv00.net/pic/
|
||||
*/
|
||||
|
||||
async function handleDa8mRequest(request) {
|
||||
console.log('Request received:', request.url);
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
参考了即刻图床开源的京东客服接口 https://jike.info/topic/36738
|
||||
不过我是从对方提供的浏览器插件中找到的,后来在论坛补到原文了
|
||||
*/
|
||||
|
||||
async function handlejdkfRequest(request) {
|
||||
console.log('Request received for jdkf upload:', request.url);
|
||||
|
||||
|
|
|
@ -3,11 +3,14 @@ addEventListener('fetch', event => {
|
|||
})
|
||||
|
||||
|
||||
// 示例格式 https://g.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
|
||||
// 兼容 https://qqq.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
|
||||
// 兼容 https://os.i.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
|
||||
// 兼容 https://vac.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
|
||||
// 兼容 https://offline.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
|
||||
/*
|
||||
示例格式 https://g.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
|
||||
兼容 https://qqq.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
|
||||
兼容 https://os.i.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
|
||||
兼容 https://vac.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
|
||||
兼容 https://offline.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
|
||||
似乎屏蔽了CF的IP或者其他原因
|
||||
*/
|
||||
|
||||
async function handle10086Request(request) {
|
||||
console.log('Request received:', request.url);
|
||||
|
|
|
@ -2,6 +2,10 @@ addEventListener('fetch', event => {
|
|||
event.respondWith(handleQst8Request(event.request));
|
||||
});
|
||||
|
||||
/*
|
||||
接口来自 https://mlw10086.serv00.net/pic/
|
||||
*/
|
||||
|
||||
async function handleQst8Request(request) {
|
||||
console.log('Request received:', request.url);
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
// 参考了 https://github.com/k08255-lxm/WX-MT_Image/blob/main/upload_wechat.php
|
||||
// 以及 https://github.com/x-dr/telegraph-Image/blob/main/src/app/api/tencent/route.js
|
||||
/*
|
||||
参考了 https://github.com/k08255-lxm/WX-MT_Image/blob/main/upload_wechat.php
|
||||
以及 https://github.com/x-dr/telegraph-Image/blob/main/src/app/api/tencent/route.js
|
||||
最近应该是和谐了接口,目前应该是不可用
|
||||
*/
|
||||
|
||||
async function handleTencentRequest(request) {
|
||||
try {
|
||||
|
|
|
@ -2,6 +2,10 @@ addEventListener('fetch', event => {
|
|||
event.respondWith(handleTgphimgRequest(event.request));
|
||||
});
|
||||
|
||||
/*
|
||||
接口来自 TGPH的Debug通道,随时可能取消,图片可能也没掉
|
||||
*/
|
||||
|
||||
async function handleTgphimgRequest(request) {
|
||||
// 确认请求方法为 POST 并且内容类型正确
|
||||
if (request.method !== 'POST' || !request.headers.get('Content-Type').includes('multipart/form-data')) {
|
||||
|
|
|
@ -2,6 +2,10 @@ addEventListener('fetch', event => {
|
|||
event.respondWith(handleTgphimgRequest(event.request));
|
||||
})
|
||||
|
||||
/*
|
||||
接口来自 TGPH的原通道,后来在TG老板被抓后取消
|
||||
*/
|
||||
|
||||
async function handleTgphimgRequest(request) {
|
||||
// 确认请求方法为 POST 并且内容类型正确
|
||||
if (request.method !== 'POST' || !request.headers.get('Content-Type').includes('multipart/form-data')) {
|
||||
|
|
|
@ -2,6 +2,10 @@ addEventListener('fetch', event => {
|
|||
event.respondWith(handleVviptuangouRequest(event.request));
|
||||
});
|
||||
|
||||
/*
|
||||
接口来自 https://mlw10086.serv00.net/pic/
|
||||
*/
|
||||
|
||||
async function handleVviptuangouRequest(request) {
|
||||
console.log('Request received:', request.url);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user