Git Product home page Git Product logo

chenyfan-tester / ipfs_photo_share Goto Github PK

View Code? Open in Web Editor NEW
89.0 3.0 40.0 1.58 MB

💰用甚嚒服务器,ServerLess搭建一个图片分享站点!| 基于CloudFlareWorker无服务器函数和IPFS去中心化存储的图片分享网站

Home Page: https://photo.cyfan.top

CSS 58.12% HTML 8.01% JavaScript 33.87%
workerjs cloudflare cloudflare-workers cloudflare-worker serverless serverless-functions

ipfs_photo_share's Introduction

IPFS图片分享站

本来只是自己随手写的一个小项目,也没想着怎么规范化,只是怎么方便怎么来,没想到会这么多人想搭建。

稍微重写了一下,目前搭建就是直接把./dist/index.min.js复制到Worker框里面,然后配置。

配置过程

绑定KV

设置=>KV 命名空间绑定=>编辑变量=>添加绑定

  • 变量名称 => KV
  • KV 命名空间 => 下拉,选一个

设置变量

KV的写入次数是有限的,避免被滥用和盗刷,我们强制开启了人机验证模块reCAPTCHA V3无感知评分

请先注册reCAPTCHA(需要梯子),选择类型为"reCAPTCHA第3版",之后将获得的密钥设置至Workers变量。

变量名 变量内容
RECAP 在您的网站提供给用户的 HTML 代码中使用此网站密钥。
RECAP_TOKEN 此密钥用于您的网站和 reCAPTCHA 之间的通信。
PASS 此密钥将作为加密密钥,请手滚键盘,无需记忆

开发者

如果你想让这个程序工作的更好,可以修改config.json配置文件,修改后需运行webpack进行打包:

  • accept_suffix 接受的后缀 Array
  • accept_size 接受的文件最大大小 Number
  • accept_size 接受的文件名最长长度 Number
  • upload_url 由于infura官方api屏蔽了CloudFlareWorker的出口节点,此url为其反代,您也可以自建 String
  • ipfs_url ipfs镜像地址,Worker建议用CloudFlare提供的ipfs地址,您也可以自建 String
  • recap_mirror 人机验证是否开启镜像,在**大陆内必须开启 Boolean
  • recap_score 人机验证最低分数,建议0.4~0.7 Number
  • encry 加密hash,使其无法获得直链,必须在此站点内使用加密会严重拖慢程序运行时间,当出现500错误时,请尝试将此设置为false Boolean

ipfs_photo_share's People

Contributors

chenyfan avatar mcseekeri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ipfs_photo_share's Issues

卡在 "人机验证中..."

我在配置完项目后,出现下面的错误:

image

我修改了config.json,下面是修改后的

{ "accept_suffix": [ ".txt", ".zip", ".7z", ".jpg", ".png", ".gif", ".jpeg", ".webp" ], "accept_size":104857600, "accept_length":20, "upload_url": "https://cf2vercel.vercel.app/api/v0/add?pin=true", "ipfs_url":"https://cloudflare-ipfs.com/ipfs/", "recap_mirror": true, "recap_score": 0.7, "encry": false }

有没有什么解决办法

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.