Coder Social home page Coder Social logo

nodebb-plugin-onedrive's Introduction

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";
    }
}

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.