virtualzone / onedrive-uploader Goto Github PK
View Code? Open in Web Editor NEWCommand-line utility for uploading files to OneDrive.
License: MIT License
Command-line utility for uploading files to OneDrive.
License: MIT License
What could cause a "Page not found." after entering the credential?
I am using this command to upload the .rar files from a folder. But it gives me an error.
onedrive-uploader_windows_amd64_v0.8.0.exe upload "F:\Arma 3\Rpack\*.rar" /Arma3
If I put it directly with the file name, it works.
How can i fix this?
I have tried to upload file to one drive but it throw Could not upload file: received unexpected status code 400
How can i fix this error ?
@virtualzone
I would like to run this headless on a Raspberry Pi 4, but there seems to be no binary for armv71.
Also, not so much an issue but rather a feature request: could you make it so that login can be done fully headless, without the use of a machine with a webbrowser?
Hello,
I can upload my files on my OneDrive.
But I would like to know if it was possible to set up an automatic retention to manage backups without overloading my OneDrive.
Thank you!
After I execute
git clone https://github.com/virtualzone/onedrive-uploader.git
cd onedrive-uploader
make
it finished build, but returns,
onedrive-uploader: command not found
Hi, thanks for this tool, it is very useful, although I noticed that the upload procedure takes alot of time when the file is very big, for example 10G.
Is there any way to improve this?
Not an issue, but a question: Given the prerequisite to create an AAD application, I'm assuming this tool is intended for OneDrive for Business. Is it possible to adapt this for a personal OneDrive account? (i.e. you're a home user who has licensed O365, but don't have your own AAD tenant).
Thanks - this tool looks very useful, much more reliable to upload files en masse than the browser based approach.
I followed the instructions in the readme.
When I run command:
# onedrive-uploader mkdir test
I get the error:
Could not renew access token: received unexpected status code 400
Is it possible that Microsoft imposes some bandwidth limitations to the Azure app that we use to connect onedrive-uploader? I can never get more than about 300 kB/s while via the browser I can upload with multiple MB/s.
Is it possible to upload a file towards a shared folder where the user has access to?
cat ./VERSION | awk NF
"" > version.gocat ./VERSION | awk NF
Could you please make it possible on arm device?
As the title said, I can i use this lib in my personal project?
Hi @virtualzone ,
Thanks for developing this great tool. I kept getting the 401 errors even though everything is configured correctly. you can refer to the screen recording, thank you again !
https://user-images.githubusercontent.com/9862466/198870703-c35fb9b5-1447-43ba-ab74-bc3853335d53.mp4
Hello, thanks for the tool.
I followed the instructions on the README, giving permission only to the App Folder. Any command that I issue gets me an access denied message, for instance:
% onedrive-uploader ls /
Could not list: received unexpected status code 403: Access denied (accessDenied)
I suppose I should point to the App Folder, but I don't know what that is and couldn't find instructions about this. In my OneDrive, an Apps
(actually Aplicativos
because it's in Brazilian Portuguese) folder was created automatically, but there's nothing inside it. I tried creating an onedrive-uploader
folder inside it to access that, but still access denied. I tried mkdir
and upload
but they all get status code 403.
The documentation from Microsoft mentions a special folder namespace, but that doesn't work either (I guess it works only if used in the REST API calls within onedrive-uploader)...
If it helps to know, in the onedrive-uploader config
process, I chose options:
Available scopes:
1) Default (Files.Read, Files.ReadWrite, Files.Read.All, Files.ReadWrite.All, offline_access)
2) App Root (Files.ReadWrite.AppFolder, offline_access)
3) Custom
Select Scopes [1]: 2
Available Drive Roots:
1) Default (/drive/root)
2) App Root (/drive/special/approot)
3) Custom
Select Drive Root [1]: 2
Appreciate if you could help me with this. Thanks!
Hi,
I use this utility quite a lot and one thing I have noticed is that sometimes there are filenames that have characters like $.|
, etc that cause this to give error:400, and when I remove those characters as suggested in Microsoft Graph API Docs, it uploads without an issue.
Another Important Issue
./output/ something i like.pdf
will not upload due to a while space before the name something
. Where as this will upload ./output/something i like.pdf
../output/something i like.pdf
will not upload and hence it needs to be fixed. """
Removes Illegal OneDrive Characters
"""
correct_name = filename.split('/')[2]
correct_name = correct_name.lstrip()
# removing the illegal characters
# ~ " # % & * : < > ? / \ { | }
correct_name = correct_name.replace('~', '')
correct_name = correct_name.replace('"', '')
correct_name = correct_name.replace('#', '')
correct_name = correct_name.replace('%', '')
correct_name = correct_name.replace('&', '')
correct_name = correct_name.replace('*', '')
correct_name = correct_name.replace(':', '')
correct_name = correct_name.replace('<', '')
correct_name = correct_name.replace('>', '')
correct_name = correct_name.replace('?', '')
correct_name = correct_name.replace('/', '')
correct_name = correct_name.replace('\\', '')
correct_name = correct_name.replace('{', '')
correct_name = correct_name.replace('|', '')
correct_name = correct_name.replace('}', '')
So, I think this should be No. 1 Priority in onedrive-uploader
releases from now on.
So, I'm using this fantastic command-line tool in a project where time is of the essence, and hence we need to upload all of the files and then delete them from our server. My question is when is this token going to expire.
Could not log in: verify you're using the client secret's value (not ID) and the API permissions are set correctly
Microsoft doesn't allow public client to redeem authorization code with client_secret
, so the login logic needs to update.
401 Unauthorized
error: invalid_client
error_description: AADSTS700025: Client is public so neither 'client_assertion' nor 'client_secret' should be presented.
error_codes: 700025
https://github.com/virtualzone/onedrive-uploader/blob/main/sdk/login.go#L98
Remove client_secret
in config:
{
"client_id": "xxxxxxxxxxxxxxxxxx",
"client_secret": "", <- Put to empty
"scopes" [
"Files.Read",
"Files.ReadWrite",
"Files.Read.All",
"Files.ReadWrite.All",
"offline_access"
],
"redirect_uri": "http://localhost:53682/",
"root": "/",
......
@virtualzone Cloud you improve ui screen eg. add estimate time or progress bar ? when i upload large file it look like it freezing
Originally posted by @wavemoroc001 in #8 (comment)
I installed onedrive-uploader, config.json and secret.json in /home/user/.local/bin/
directory, it works fine in this directory,and when I run them in other directories, it will prompt:Could not read config: open ./config.json: no such file or directory.
onedrive-uploader version:0.50
system: Debian arm 5.15
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.