• Stars
    star
    275
  • Rank 149,796 (Top 3 %)
  • Language
    Go
  • License
    MIT License
  • Created over 3 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A lightweight, universal cloud drive upload tool for all platforms

简体中文

LightUploader

MoeClub wrote a very good version, but unfortunately it's not open source and hasn't been updated in a while. This project is a simple upload tool separate from DownloadBot, designed to be a lightweight way to quickly upload data to various network drives on all platforms.

Features

  • Supports OneDrive Business, Personal (Home) versions, 21vianet (CN) version, Google Drive.
  • Support for uploading files and folders to specified directories, keeping the directory structure as it was before the upload.
  • Supports the use of command parameters for external applications.
  • Support for customising the upload chunk size.
  • Supports multi-threaded uploads (multiple files at the same time).
  • Support for dynamically adjusting the number of retries according to the file size.
  • Supports skipping the existing files with the same name in the OneDrive.
  • Support for real-time monitoring of upload progress via Telegram Bot, for easy monitoring of uploads when using fully automated download scripts.

Authorize

See wiki for details

Initialization profile

# OneDrive Business
LightUploader -a "url"

# OneDrive Business, and use Chinese language pack
LightUploader -a "url" -l zh-CN

# OneDrive Personal (Home)
LightUploader -a "url" -v 1

# OneDrive 21vianet (CN) version, and use Chinese language pack
LightUploader -a "url" -v 2 -l zh-CN

# Get the entire url in the browser address bar starting with http://loaclhost
# Replace the full url with the three letters of the "url" in the command
# Each url generated can only be used once, try again to retrieve the url
# This action will automatically initialise the configuration file

# Google Drive
LightUploader -v 3

Use

Usage of LightUploader:
  -a string
        //Setup and Init auth.json.
  -b string
        //Set block size. [Unit: M; 5<=b<=60;] (default "10")
  -c string
        //Config file.

  -r string
        //Upload to reomte path.
  -l string
        // Software language
  -f string
        // *Necessary parameters, file or folder to upload
  -t string
        // Number of threads, number of files uploaded at the same time. Default: 3
  -to int
        // The timeout time of a single packet is 60s by default
  -tgbot string
        //Use the Telegram bot to monitor uploads in real time, here you need to fill in the access token of the bot, e.g. 123456789:xxxxxxxxxx, use double quotes to wrap it
  -uid string
        // Use the Telegram bot to monitor uploads in real time, here you need to fill in the recipient's userID, shaped like 123456789
  -m int
        // Select the mode, 0 is to replace the file with the same name in cloud drive, 1 is to skip, the default is 0
  -v int
        // Select the version, where 0 is the OneDrive Business version and 1 is the OneDrive Personal (Home) version, 2 is OneDrive 21vianet (CN) version, 3 is Google Drive, the default is 0

Config

{
    "Drive":"OneDrive",
    // Authorisation tokens
    "RefreshToken": "1234564567890ABCDEF",
    // Maximum number of threads. (Number of simultaneous file uploads)
    "ThreadNum": 2,
    // Maximum upload chunk size. (The maximum chunk size for each file upload, it is recommended to reduce it if the network is not good. Unit: MB)
    "BlockSize": 10,
    // Maximum single file size. (Currently: 100GB single file limit for Personal Edition (Home Edition); 15GB single file limit for other editions, Microsoft will update to 100GB over time. Unit: GB)
    "SigleFile": 100,
    // If this is the Chinese version (CenturyLink), this should be true.
    "MainLand": false,
    //Software language
    "Language": "zh-CN",
    //timeout
    "TimeOut": 60,
    //Telegram Bot key
    "BotKey": "",
    //Telegram User ID
    "UserID": ""
}

Note that when a configuration file is used at the same time and the parameters in the configuration file are not the default values, the parameters in the configuration file will be used by default, and when parameters are entered on the command line, the parameters currently entered on the command line will be used and the parameters in the configuration file will be changed. That is, the parameters in the command line take precedence over the parameters in the configuration file and will change the parameters in the configuration file.

Examples

# Some examples:

# Upload the mm00.jpg file from the same directory to the root of the OneDrive
LightUploader -c xxx.json -f "mm00.jpg"

# Upload the Download folder from the same directory to the root of the OneDrive
LightUploader -c xxx.json -f "Download" 

# Upload the Download folder from the same directory to the Test directory of the OneDrive
LightUploader -c xxx.json -f "Download" -r "Test"

# Upload the Download folder from the same directory to the root of the OneDrive, using 10 threads
LightUploader -c xxx.json -t 10 -f "Download" 

# Upload the download folder in the same directory to the root directory of onedrive, use 10 threads, and skip the file with the same name
LightUploader -c xxx.json -t 10 -f "Download" -m 1

# Upload the download folder in the same directory to the root directory of onedrive, use 10 threads, and set the timeout to 30 seconds
LightUploader -c xxx.json -t 10 -f "Download" -to 30

# Upload the Download folder from the same directory to the root of the OneDrive, using 10 threads, while using Telegram Bot to monitor the progress of the upload in real time
LightUploader -c xxx.json -t 10 -f "Download" -tgbot "123456:xxxxxxxx" -uid 123456789

# Upload the download folder in the same directory to the root directory of onedrive network disk, use 10 threads, and use the telegram BOT parameter loader in the configuration file to monitor the upload progress in real time (provided that the configuration file contains the parameters of telegram BOT)
LightUploader -c xxx.json -t 10 -f "Download" -tgbot "1"


# Upload the Download folder from the same directory to the root of the OneDrive, using 15 threads, and setting the chunk size to 20M
LightUploader -c xxx.json -t 15 -b 20 -f "Download" 

Note

Returns 0 when there is no problem with the upload, which can be used as evidence of whether the upload has failed or not

More Repositories

1

DownloadBot

(Currently) 🤖 A distributed cross-platform Telegram Bot that can control your Aria2 server, control server files and also upload to OneDrive / Google Drive.
Go
799
star
2

NMSL

一个纯前端的抽象话转换器
HTML
422
star
3

OneDriveShareLinkPushAria2

Extract download URLs from OneDrive or SharePoint share links and push them to aria2, even on systems without a GUI.
Python
311
star
4

web-video-thumbnailer

For a web video that can be downloaded in segments, it is possible to create an overview of the video by downloading only a small amount of binary data.
Python
28
star
5

MagicPassword

Need to generate a password? Try Gaowanliang Strong Password Generator. Just need a master password to generate secure passwords to keep your network safe.
HTML
19
star
6

googleTranslatorKusaMaker

谷歌翻译生草机
CSS
14
star
7

NetworkRepair

A small tool for repairing some websites that are not available for network reasons
Perl
10
star
8

CloudflareSpeedTestMobile

🌩 使用移动端测试 Cloudflare CDN 延迟和速度,获取最快 IP (IPv4+IPv6)!
Dart
9
star
9

geekchat

多房间的基于socket.io的聊天室
HTML
7
star
10

prompt-library

Vue
6
star
11

regex101-proxy

HTML
6
star
12

V2rayNCustomizePAC

Convenient customization of the domain name to be operated to the PAC file in V2rayN
C#
5
star
13

wylmtbfy

需要我帮你百度一下吗——Would you like me to baidu for you
CSS
5
star
14

Word-Dictation-and-Correction

A small program that allows dictation of words and dictation of mispronounced words for rewriting.
Dart
5
star
15

gaowanliang.github.io

高玩梁的个人博客
HTML
3
star
16

Privacy-Image-Watermark-Generator

Secure your private images with a full page watermark.
Vue
3
star
17

LaTeX2MathML

A tool to easily convert LaTeX to MathML
HTML
2
star
18

gopaste

Secure and private online pastebin based on golang
HTML
2
star
19

gitment-store

图床
CSS
1
star
20

Terminflow

A cross-platform SSH client that synchronizes connection information
1
star
21

yigedinglia

基于Python的成语接龙程序,可以自动接到一个顶俩
CSS
1
star
22

ZiYouBei

一个程序自由背遍天下题
JavaScript
1
star
23

Aria2_OneIndex

支持Debian
Shell
1
star
24

Qt-demo

This demo implements a C language registration / login server and a QT client
C++
1
star
25

md2CP

CSS
1
star
26

C51-Electronic-Organ

Analog electronic organ / music box system based on AT89C52 通过AT89C52单片机实现的模拟电子琴/八音盒系统
C
1
star