nodebb-plugin-onedrive

0.1.0 • Public • Published

NodeBB Plugin onedrive

A plugin that uploads images and files to onedrive, refer from nodebb-plugin-imgur and onedrive-api.

Installation

npm install nodebb-plugin-onedrive

Preview

When upload a picture or file, it can upload to the onedrive automatics and convert the url in the markdown.

test

Setup

You can set up upload which kind of pictures to onedrive config

Auth

You need to set up the config of client_id, client_secret, refresh_token.

Please refer to the microsoft graph-oauth, and heymind obtain refresh_token.

Get the public url of the upload picture

Use such as FODI to index the content of the onedrive. base_dir is the share dir in your onedrive.

Then you can use nginx to reverse proxy to that server. And then set the redirect_url to that.

Here's a example of using FODI, when redirect_url=xxx.yyy.zzz and share the /public path.

server {
    listen 80;
    gzip on;
    server_name xxx.yyy.zzz;
    charset utf-8;
 
    location / {
        rewrite ^(.*) "https://yourserver?file=$request_uri";
    }
}

/nodebb-plugin-onedrive/

    Package Sidebar

    Install

    npm i nodebb-plugin-onedrive

    Weekly Downloads

    1

    Version

    0.1.0

    License

    BSD-2-Clause

    Unpacked Size

    554 kB

    Total Files

    11

    Last publish

    Collaborators

    • yurisizuku