From 19342808e8783461f7f4dd3b88adfdc1fc648a15 Mon Sep 17 00:00:00 2001 From: Spencer Woo Date: Wed, 29 Dec 2021 16:46:28 +0800 Subject: [PATCH] add images and emojis --- README.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 73 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 069a1e6..6e26c31 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,74 @@ Live demo at [Spencer's OneDrive](https://drive.spencerwoo.com). ## Features -
File previewImage previewVideo and audio
PDF, EPUB, markdown, code, plain textAlso in gallery modemp4, mp3, ..., play online or with IINA, PotPlayer...
Office previewREADME.md previewPagination
docx, pptx, xlsx, ...Also renders code blocks, images with relative links, ...For folders with 200 or more items
Protected foldersMulti-file download... and more!
Password protected routes and files, details down hereCompress and download multiple files or folders, details down herePermalink copy, direct raw-file serving, dark mode, customisations...
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 👀 File preview + + 🖼️ Image preview + + 🎥 Video and audio +
PDF, EPUB, markdown, code, plain textAlso in gallery modemp4, mp3, ..., play online or with IINA, PotPlayer...
+ 📄 Office preview + 📝 README.md preview📑 Pagination
docx, pptx, xlsx, ...Also renders code blocks, images with relative links, ...For folders with 200 or more items
🔒 Protected folders⏬ Multi-file download⏭ Proxied download
Password protected routes and files, details down here + Compress and download multiple files or folders, + details down here ↓ + + Download files with streams proxied through Vercel Serverless, + details down here ↓ +
-More importantly, it's pretty (●'◡'●) +... and more: + +- Direct raw-file serving, proxied file serving ... +- Permalink copy, proxied download link copy ... +- Full dark mode support, style and website customisations... + +🍌 More importantly, it's pretty (●'◡'●) ## Deployment @@ -41,7 +106,7 @@ The authentication tokens and variables are the same as what you configured in t ## These may interest you ... -### Password protected folders +### 🔒 Password protected folders https://user-images.githubusercontent.com/32114380/146787150-fb30c5fe-7fdf-4de6-bd43-1bd0a98547b0.mp4 @@ -65,7 +130,7 @@ However, there are some caveats: [*Discussion #66.*](https://github.com/spencerwooo/onedrive-vercel-index/discussions/66) -### Multi-file and folder download +### ⏬ Multi-file and folder download https://user-images.githubusercontent.com/32114380/146787219-0d546eb6-71dc-4c3c-8871-86dde1d98ffb.mp4 @@ -75,7 +140,7 @@ Folders are traversed and recursively fetched into the compressed zip. Multiple *PR [#177](https://github.com/spencerwooo/onedrive-vercel-index/pull/177) and [#169](https://github.com/spencerwooo/onedrive-vercel-index/pull/169).* -### OneDrive as your website's image storage +### 🖼 OneDrive as your website's image storage Yes, it can be used as an image (or any kind of file) online storage, where the raw file link is exported and can be embedded into your blog or other websites. Images, videos, songs, PDFs..., you name it. @@ -85,12 +150,13 @@ Yes, it can be used as an image (or any kind of file) online storage, where the ![nyan cat](https://drive.spencerwoo.com/api?path=/%F0%9F%A5%9F%20Some%20test%20files/nyancat.gif&raw=true) -### Proxied download +### ⏭ Proxied download In order to speed up (I doubt it would?) download speed when files are directly served on OneDrive servers, we can leverage a proxied download which relays the file download stream through Vercel Serverless first, then back to our own device. You can download a file via this method by either clicking on the `Proxy download` button beside the normal `Download` button in file preview pages ... +![Proxied download button](https://user-images.githubusercontent.com/32114380/147642523-00fa4aed-86e7-4762-ae53-6011074580a5.png) ... or craft the API request yourself: @@ -104,7 +170,7 @@ Only thing to keep in mind is that the parameter `url` should be a direct OneDri https://drive.spencerwoo.com/api/proxy?url=https%3A%2F%2Fpublic.dm.files.1drv.com%2Fy4myMMSl7_RbMnKGsEh63emSTxRqfK74Ove5_k-zuKFv7Y_uet4FeuwI5X3NW8IjdkOlvoIRfq64XICJeHeZiRDBcnJuH-lfjZUQykrMM11xO9H3Z8GPRA9lfjjjdYXQAcMc2XYAr1Pnmod3PeEYoAKAArFEyLKvwk19iypsEDhXbl6L8-f1QxMGGlf6tboO0XijBdxtmV4oQJLmutVk44kETDC-16Sfj2--9erJfsH_W1EEddXUB-vEtpRoBM20srt ``` -> An `&inline=true` parameter is also accepted here, where the response header `content-disposition` of the direct file stream from OneDrive is replaced from `attachment, filename*=...` to `inline, filename*=...`. This only applied to PDF files with a header `content-type` of `application/pdf`, so that the PDF returned can be viewed inside the browser, instead of being force downloaded. +> An `&inline=true` parameter is also accepted here, where the response header `content-disposition` of the direct file stream from OneDrive is replaced from `attachment, filename*=...` to `inline, filename*=...`. This only applies to PDF files with a header `content-type` of `application/pdf`, so that the PDF returned can be viewed inside the browser, instead of being force downloaded. *Feature parity with original project: [Proxied / raw file download](https://github.com/spencerwooo/onedrive-cf-index#%EF%B8%8F-proxied--raw-file-download).*