aria-telegram-mirror-bot icon indicating copy to clipboard operation
aria-telegram-mirror-bot copied to clipboard

Cannot upload to Team-Drives

Open Yash-Garg opened this issue 6 years ago • 26 comments

I tried putting up my team drive folder ID but it does not works !!

Log below :

download:https://raw.githubusercontent.com/Yash-Garg/scripts/master/README.mkdn gid:15948ac98dd005bb
start 15948ac98dd005bb
onDownloadComplete: /home/yashg/MirrorUploads/README.mkdn
processFileOrDir: /home/yashg/MirrorUploads/README.mkdn
Uploading file README.mkdn to Google drive.
Got file id null
uploadFile: deleting
uploadFile: /home/yashg/MirrorUploads/README.mkdn: {}
cleanupDownload: deleting

Yash-Garg avatar Nov 06 '18 14:11 Yash-Garg

Delete line 72 in drive/upload-file.js. In its place, write, console.log(body);

Then try to upload again, and give me the full message in the console, redacting any private information.

out386 avatar Nov 06 '18 14:11 out386

Made changes as you said !

The log shows this :

download:https://raw.githubusercontent.com/Yash-Garg/scripts/master/README.mkdn gid:c5daf342125dd257
start c5daf342125dd257
onDownloadComplete: /home/yashg/MirrorUploads/README.mkdn
processFileOrDir: /home/yashg/MirrorUploads/README.mkdn
Uploading file README.mkdn to Google drive.
{ error: 
   { errors: [ [Object] ],
     code: 404,
     message: 'File not found: 0AB3jIfgH0qPTUk9PVA.' } }
uploadFile: deleting
uploadFile: /home/yashg/MirrorUploads/README.mkdn: {}
cleanupDownload: deleting

Yash-Garg avatar Nov 06 '18 15:11 Yash-Garg

Is your drive folder ID 0AB3jIfgH0qPTUk9PVA? If not, and that's the file ID, I'll have to look into Team Drives. Also, does the file show up in Drive itself? If yes, is its ID the one in the error message?

out386 avatar Nov 06 '18 17:11 out386

Yea 0AB3jIfgH0qPTUk9PVA is the folder ID. Also the file does not shows up in GDrive.

This bot works perfectly with the Personal Drive but not with Team one's.

The ID in the error message and folder ID are same.

Yash-Garg avatar Nov 06 '18 17:11 Yash-Garg

@out386 Any lead on it ?

Yash-Garg avatar Nov 09 '18 15:11 Yash-Garg

Couldn't find anything that might be breaking it for team drives. Will keep this issue open till I find something.

out386 avatar Nov 09 '18 15:11 out386

Last time I got file id null , it was due to account not having write access to the folder 🤔🤔🤔

gotenksIN avatar Nov 09 '18 16:11 gotenksIN

I assume that you fixed it, but still got the same problem?

out386 avatar Nov 09 '18 16:11 out386

I wasn't using team drive , I just use my friends drive and he accidentally used other account which led to me having file id error

gotenksIN avatar Nov 09 '18 16:11 gotenksIN

I have the access to create folders and add things to it @songotenks69

Yash-Garg avatar Nov 09 '18 17:11 Yash-Garg

Having same issue. With personal drive it works well, but team drive breaks it The error seems to be "Got file id null"

pahapoika avatar Nov 25 '18 07:11 pahapoika

Having same issue. With personal drive it works well, but team drive breaks it The error seems to be "Got file id null"

Yeah!

Yash-Garg avatar Nov 25 '18 08:11 Yash-Garg

any progress on this @out386

DESTROYER-32 avatar Sep 03 '19 17:09 DESTROYER-32

Adding supportsAllDrives: 'true' to body in src/drive/drive-utils.ts (after line 26) should allow uploading files to team drives. But Team Drives needs several changes, and I haven't tested this yet, so I can't say if adding that to body will work. Try. Relevant documentation

out386 avatar Sep 03 '19 19:09 out386

ill try thanks

DESTROYER-32 avatar Sep 04 '19 16:09 DESTROYER-32

Probably fixed it in 290385349d46ab4612efc85f99933903c5d8d16c. Will keep this issue open for a few days just in case.

out386 avatar Dec 22 '19 08:12 out386

It doesn't search inside the folders on normal drivers either afaik

gotenksIN avatar Dec 26 '19 13:12 gotenksIN

while it uploads the file, the error occurs.

Happens with all files, all the time? Delete your credentials.json and client-secret.json and try authenticating again.

it searches the same folder which we provided. not the files and folders inside those folders. big problem.

That is a Google Drive API limitation. No recursive searching.

out386 avatar Dec 26 '19 13:12 out386

That URL is already provided in the href attribute. But that still won't be publicly accessible - that's just how Team Drives work.

out386 avatar Dec 27 '19 11:12 out386

I tried putting up my team drive folder ID but it does not works !!

Log below :

download:https://raw.githubusercontent.com/Yash-Garg/scripts/master/README.mkdn gid:15948ac98dd005bb
start 15948ac98dd005bb
onDownloadComplete: /home/yashg/MirrorUploads/README.mkdn
processFileOrDir: /home/yashg/MirrorUploads/README.mkdn
Uploading file README.mkdn to Google drive.
Got file id null
uploadFile: deleting
uploadFile: /home/yashg/MirrorUploads/README.mkdn: {}
cleanupDownload: deleting

Yep, I got just the Same error while using TD.

mr-wh1tehat avatar Nov 10 '20 11:11 mr-wh1tehat