Skip to content
/ kotdrive Public

Upload Big File to OneDrive via OneDrive API in incredible speed

License

Notifications You must be signed in to change notification settings

mamoe/kotdrive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 Cannot retrieve latest commit at this time.

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kotdrive

OneDrive API in Kotlin

now supported:

  • Upload File(15G max) to OneDrive
  • val driver = oneDriveWorker {
            object : AuthProvider {
                override suspend fun getAccessToken(): AccessToken {
                    return AccessToken("bearer", TODO())//ways to get ur token, cache is needed
                }
                //also you can set the API url to use business API index
            }
        }
    
    
        try{
            driver.tryNTimes(2) {//try 2 times before upload failed
                this.upload(ConflictBehavior.REPLACE,"mirai/plugins/Test.md", File(System.getProperty("user.dir") + "/README.md"))
            }
            println("Upload Success")
        }catch (e:Exception){
            println("Failed to upload")
            e.printStackTrace()
        }
    

    About

    Upload Big File to OneDrive via OneDrive API in incredible speed

    Resources

    License

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    Languages