You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-19Lines changed: 5 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,32 +22,18 @@ send your file through onedrive
22
22
23
23
## Limitations
24
24
25
-
-**MUST** hosted on https site
26
-
- Cannot work in Firefox InPrivate window
27
-
- Leaving downloading page will interrupt downloading
25
+
-**MUST** hosted on https site
26
+
-Cannot work in Firefox InPrivate window
27
+
-Leaving downloading page will interrupt downloading
28
28
29
29
## Deploy
30
30
31
31
1. download from release and unzip
32
-
2. fill in _config.toml_
33
-
3. fill your refresh token into _token.txt_ (you can refer to [Authorization](#Authorization))
34
-
4. run program
32
+
1. run program
35
33
36
34
## Configuration
37
35
38
-
**ClientID**: client id
39
-
**ClientSecret**: client secret
40
-
**AccountArea**: the area of your onedrive account, can be ("global" | "gov" | "de" | "cn")
41
-
**Drive**: the drive path to use. default: "/me/drive"
42
36
**SavePath**: where to save files in your onedrive
43
37
**Listen**: how the program bind address
44
38
45
-
## Authorization
46
-
47
-
1. Open <https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade> and then click `New registration`.
48
-
1. Enter a name for your app, choose account type `Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)`, select `Web` in `Redirect URI`, then type `http://localhost:53682/` and click Register. Copy and keep the `Application (client) ID` under the app name for later use.
49
-
1. Under `manage` select `Certificates & secrets`, click `New client secret`. Copy and keep that secret value for later use (secret value, not secret ID).
50
-
1. Under `manage` select `API permissions`, click `Add a permission` and select `Microsoft Graph` then select `delegated permissions`.
51
-
1. Search and select the following permissions: `Files.ReadWrite.All`. Once selected click `Add permissions` at the bottom.
52
-
1. Download [this script](./auth.ps1) on your Windows computer, click `run in powershell` in the right-click menu, enter your `client id` and `client secret`, and follow the instruction to get `refresh_token`. (if the script is forbidden, execute in powershell as administrator `Start-Process -Wait -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force`)
53
-
1. When finished, `token.txt` is saved on your desktop.
39
+
if you want to use your private client_id and client_secret to setup this app, you can check [This Instruction](./docs/Private-App.md)
<p>Click the button below to authorize access to your Onedrive account.</p>
14
+
<buttonid="auth">Authorize</button>
15
+
<script>
16
+
(function(){
17
+
if(!isSecureContext){
18
+
alert('This page must be accessed via HTTPS.');
19
+
document.body.innerText='This app use service worker to emulate download, and service worker only works on HTTPS. Please setup an HTTPS reverse proxy to host this app.'
If you want to use your private client_id and client_secret to setup this app, you can follow the steps below.
4
+
5
+
## Authorization
6
+
7
+
1. Open <https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade> and then click `New registration`.
8
+
1. Enter a name for your app, choose account type `Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)`, select `Web` in `Redirect URI`, then type `http://localhost:53682/` and click Register. Copy and keep the `Application (client) ID` under the app name for later use.
9
+
1. Under `manage` select `Certificates & secrets`, click `New client secret`. Copy and keep that secret value for later use (secret value, not secret ID).
10
+
1. Under `manage` select `API permissions`, click `Add a permission` and select `Microsoft Graph` then select `delegated permissions`.
11
+
1. Search and select the following permissions: `Files.ReadWrite.All`. Once selected click `Add permissions` at the bottom.
12
+
1. Download [this script](./auth.ps1) on your Windows computer, click `run in powershell` in the right-click menu, enter your `client id` and `client secret`, and follow the instruction to get `refresh_token`. (if the script is forbidden, execute in powershell as administrator `Start-Process -Wait -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force`)
13
+
1. When finished, `token.txt` is saved on your desktop.
14
+
15
+
## Configuration
16
+
17
+
open `config.toml` and fill in the following fields:
18
+
19
+
**ClientID**: client id
20
+
**ClientSecret**: client secret
21
+
**AccountArea**: the area of your onedrive account, can be ("global" | "gov" | "de" | "cn")
22
+
**Drive**: the drive path to use. default: "/me/drive"
23
+
24
+
open `token.txt` and copy the refresh token to the file.
0 commit comments