alx-xlx / goindex

Index your Google Drive
https://goindex.teamsdrives.workers.dev
1.26k stars 652 forks source link

How to upload file? #44

Closed quocthinhvo closed 3 years ago

alx-xlx commented 3 years ago

You can use the goindex-vue.js to upload files

you can use GUI to upload OR if CLI is your thing then use HTTP requests

Example:

gdindex_upload.py

## Python Example
import requests

to_upload = "https://i.imgur.com/8w2KDrG.gif"
# "upload: true" in the script
baseURL = "https://gdindex-dark.teamsdrives.workers.dev/"
fileName = "goindex.gif"
# "folder1/folder2/goindex.gif"
teamDriveID = "0ANCHcQq-8cmvUk9PVA" # Default - "root"

URL = baseURL + "/" + fileName + "?rootId=" + teamDriveID + "&url=" + to_upload
r = requests.put(URL)
print(r.text)
quocthinhvo commented 3 years ago

thanks. I will try. @alx-xlx

Bugaddr commented 3 years ago

sorry to restart thread but how to use this script or shall i need extra server

rishabh2021u commented 2 years ago

Hey How can i upload a local file?