onesend
onesend copied to clipboard
send files through onedrive
Onesend
send your file through onedrive
Features
- Upload file without login, share anytime!
- End-to-end encryption, security matters!
- Onedrive storage, No traffic passthrough, free your server!
- CLI command generation, easy for linux command-line download!
Limitations
- MUST hosted on https site
- Cannot work in Firefox InPrivate window
- Leaving downloading page will interrupt downloading
Demo
Deploy
- download from release and unzip
- fill in config.toml
- fill your refresh token into token.txt (you can refer to Authorization)
- run program
Configuration
ClientID: client id
ClientSecret: client secret
AccountArea: the area of your onedrive account, can be ("global" | "gov" | "de" | "cn")
Drive: the drive path to use. default: "/me/drive"
SavePath: where to save files in your onedrive
Listen: how the program bind address
Authorization
- Open https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade and then click
New registration
. - 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)
, selectWeb
inRedirect URI
, then typehttp://localhost:53682/
and click Register. Copy and keep theApplication (client) ID
under the app name for later use. - Under
manage
selectCertificates & secrets
, clickNew client secret
. Copy and keep that secret value for later use (secret value, not secret ID). - Under
manage
selectAPI permissions
, clickAdd a permission
and selectMicrosoft Graph
then selectdelegated permissions
. - Search and select the following permissions:
Files.ReadWrite.All
. Once selected clickAdd permissions
at the bottom. - Download this script on your Windows computer, click
run in powershell
in the right-click menu, enter yourclient id
andclient secret
, and follow the instruction to getrefresh_token
. (if the script is forbidden, execute in powershell as administratorStart-Process -Wait -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
) - When finished,
token.txt
is saved on your desktop.