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.
Setup
You can set up upload which kind of pictures to onedrive
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