All Projects → heymind → Onedrive Index Cloudflare Worker

heymind / Onedrive Index Cloudflare Worker

Licence: mit
DEPRECATED: Please use https://github.com/spencerwooo/onedrive-cf-index instead

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Onedrive Index Cloudflare Worker

Onemanager Php
An index & manager of Onedrive based on serverless. Can be deployed to Heroku/Glitch/SCF/FG/FC/CFC/PHP web hosting/VPS.
Stars: ✭ 1,313 (+170.72%)
Mutual labels:  serverless, onedrive
Cloudflare Workers Webpack Plugin
Launch Cloudflare Workers to the Edge from the comfort of your build step 🚀
Stars: ✭ 18 (-96.29%)
Mutual labels:  serverless, cloudflare
Hexoplusplus
🎁基于CloudFlareWorker的无服务器Hexo后端,目标:解决静态博客所有痛点[文章编辑、图片上传、博主活跃信息统计、博主说说、Twikoo加强版、阅读量统计【尚未完成】]
Stars: ✭ 72 (-85.15%)
Mutual labels:  serverless, cloudflare
Nitro Demo
nuxt nitro preview
Stars: ✭ 100 (-79.38%)
Mutual labels:  serverless, cloudflare
Cloudflare Workers Webpack Boilerplate
A superbly simple, minimal-config template for building, bundling and deploying Cloudflare Workers with Webpack 🚀
Stars: ✭ 101 (-79.18%)
Mutual labels:  serverless, cloudflare
Awesome Cloudflare
⛅️ Curated list of awesome Cloudflare worker recipes, open-source projects, guides, blogs and other resources.
Stars: ✭ 186 (-61.65%)
Mutual labels:  serverless, cloudflare
Pw Pwnage Cfworker
Deploy a Cloudflare Worker to sanely score users' new passwords with zxcvbn AND check for matches against haveibeenpwned's 7.8+ billion breached accounts
Stars: ✭ 125 (-74.23%)
Mutual labels:  serverless, cloudflare
Edge Sql
Cloudflare Workers providing a SQL API
Stars: ✭ 429 (-11.55%)
Mutual labels:  serverless, cloudflare
Scope
🔭 Scope - Create a birdeye's view of your Github project and embed on your site
Stars: ✭ 453 (-6.6%)
Mutual labels:  serverless
Simplestore
A clean, responsive storefront boilerplate with no database or backend
Stars: ✭ 468 (-3.51%)
Mutual labels:  serverless
React Starter Kit
React Starter Kit — front-end starter kit using React, Relay, GraphQL, and JAM stack architecture
Stars: ✭ 21,060 (+4242.27%)
Mutual labels:  cloudflare
Honeylambda
honeyλ - a simple, serverless application designed to create and monitor fake HTTP endpoints (i.e. URL honeytokens) automatically, on top of AWS Lambda and Amazon API Gateway
Stars: ✭ 454 (-6.39%)
Mutual labels:  serverless
Aws Serverless Ecommerce Platform
Serverless Ecommerce Platform is a sample implementation of a serverless backend for an e-commerce website. This sample is not meant to be used as an e-commerce platform as-is, but as an inspiration on how to build event-driven serverless microservices on AWS.
Stars: ✭ 469 (-3.3%)
Mutual labels:  serverless
Github Readme Stats
⚡ Dynamically generated stats for your github readmes
Stars: ✭ 34,955 (+7107.22%)
Mutual labels:  serverless
Now Builders
Official Now Builders created by the ZEIT team
Stars: ✭ 483 (-0.41%)
Mutual labels:  serverless
Awesome Firebase
🔥 List of Firebase talks, tools, examples & articles! Translations in 🇬🇧 🇷🇺 Contributions welcome!
Stars: ✭ 448 (-7.63%)
Mutual labels:  serverless
Nginx Autoinstall
Compile Nginx from source with custom modules on Debian and Ubuntu
Stars: ✭ 443 (-8.66%)
Mutual labels:  cloudflare
Webiny Js
Enterprise open-source serverless CMS. Includes a headless CMS, page builder, form builder and file manager. Easy to customize and expand. Deploys to AWS.
Stars: ✭ 4,869 (+903.92%)
Mutual labels:  serverless
Chromda
λ 🖼️ Chromda is an AWS Lambda function for capturing screenshots of websites.
Stars: ✭ 481 (-0.82%)
Mutual labels:  serverless
Ggwave
Tiny data-over-sound library
Stars: ✭ 465 (-4.12%)
Mutual labels:  serverless

DEPRECATED: Please use https://github.com/spencerwooo/onedrive-cf-index instead

中文 | English

OneDrive Index ( Cloudflare Worker )

🌈 演示地址

storage.idx0.workers.dev

咋用

  1. 去这里新建一个 APP https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade redirect_uri 设置成 https://heymind.github.io/tools/microsoft-graph-api-auth

  2. Certificates & secrets 面板创建一个新的 secret

  3. API permissions 面板, 添加以下权限 offline_access, Files.Read, Files.Read.All。(此权限可以在Microsoft Graph中找到)

  4. 使用这个工具 microsoft-graph-api-auth 获取 refresh_token 参数。

  5. Cloudflare Worker 管理页面创建一个新的 Worker ,粘贴 index.js 中的代码并替换相关参数。

*6. 访问密码设置(默认关闭):

const AUTH_ENABLED = true
const NAME = "admin"
const PASS = "password"

🔥 新特性 V1.1

⏬ 中转下载

利用 Cloudflare 服务器中转 OneDrive 中文件的下载,以提高中国大陆的下载体验。已知问题,无法显示下载进度。

在配置中开启 proxyDownload 功能,在文件直链路径后面加 ?proxied 即可开启,例如: https://storage.idx0.workers.dev/Other/zero_file?proxied

( Cloudflare 的速度也挺随缘的... )

☁️ 缓存功能

利用 Cloudflare CDN 来缓存 OneDrive 中文件,目前有两种缓存模式:

  • 整个文件缓存: 文件会先完整传输到 Cloudflare 的服务器后再返回给客户端。文件太大可能超过 Cloudflare Worker 限制的单次请求运行时间。
  • chunk 缓存: 流式传输与缓存,无法正确显示 Content-Length

在配置中开启 cache 功能,可以配置两种缓存模式的选择以及启用缓存的路径地址。

⏫ 小文件上传

可以利用这个工具直接上传小文件到 OneDrive 上 ( 小于 4MB ,OneDrive API 的限制,比这个大就得创建 upload session 反正很麻烦 )

在配置中开启 upload 功能,并设置一个密钥 key ( 防止游客上传文件 )。

比如:

POST https://storage.idx0.workers.dev/Images/?upload=<filename>&key=<key>

注意:开启该功能需要 Files.ReadWrite 权限

🖼️ 缩略图

对于图片文件,可以直接获取不同尺寸的缩略图。 比如:https://storage.idx0.workers.dev/Images/public-md-image-20191010113652775.png?thumbnail=mediumSquare

可用的取值参见:https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_list_thumbnails?view=odsp-graph-online#size-options

👍 没错,这就是个好用的博客图床!

同时开启缓存功能小文件上传功能后,这就是个自建图床。 配合缩略图功能,亦可提升博客页面在不同场景下的加载体验。

例如 https://blog.idx0.dev 在首页文章列表配图使使用了 large 尺寸的缩略图,在侧栏文章列表中使用了 smallSquare 尺寸的缩略图。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].