This is a simple script to authenticate yourself and upload files to Yandex Disk. It is written in Go and uses the Yandex Disk REST API to upload files to your Yandex Disk account.
-
Create a new application in the Yandex Disk OAuth page. You will need to provide a redirect URL. Since this script is meant to be run locally for now, we use
http://localhost:8080/callback
as the redirect URL. -
Copy the .env.example file to .env and fill in the values for the variables.
-
Get the dependencies for the script by running the following command:
go get
- Run the script with the following command:
go run main.go source/file.txt app:/remote/file.txt
GOOS=windows GOARCH=amd64 go build
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request