go-simple-onedrive

module
v0.0.0-...-2528dd6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2021 License: MIT

README

go-simple-onedrive

A simple Onedrive application in CLI writen by Golang

Copyright © by Nguyen The Hao 2021

Author: Nguyen The Hao (thehaohcm)

Git repository: https://github.com/thehaohcm/go-simple-ondrive

This is my simple OneDrive Application with CLI written by Golang. Currently, it just has some below basic features, I will try to implement another when I have a free time:

  • Upload file (for a normal or even large files)
  • Share an uploaded file (get link file for downloading)
  • List all children items of a specific folder
  • Create a new folder
  • Delete one item
  • Get Info of one item
  • Get download link of item
  • Download item directly in application (pending)
  • Move item to another path
  • Copy item
  • Handle Errors

Detail instruction url: https://docs.microsoft.com/en-us/graph/api/resources/onedrive?view=graph-rest-1.0

You can follow all these below steps to run an application:

1st step: clone this repo into your local pc (in branch master)

2nd step: open the application's folder by an IDE (ex: Visual Code), then run a command "go get" in terminal to install all neccessary packages (please make sure your pc has been installed GO lang and GO GET)

3rd step: open the file config.yaml and replace all neccessary variables inside with correct info of OneDrive API register's info

4th step: in the terminal openning the project's path, type a command to go inside the demo folder: cd demo

5th step: type this command along with a speific path to upload a file into your OneDrive account path: go run main.go [FILE_PATH] ex: **go run main.go

Notice: the applicaiton can upload with a large file (everything works properly when I tested by uploading a file whose size is a several GB)

This is a screenshot when the uploading file successfully completed: alt text

How to use/integrate the simple-onedrive library into your golang project

Comming soon

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL