A plugin that uploads images and files to onedrive, refer from nodebb-plugin-imgur and onedrive-api.
npm install nodebb-plugin-onedrive
When upload a picture or file, it can upload to the onedrive automatics and convert the url in the markdown.
You can set up upload which kind of pictures to onedrive
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.
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";
}
}