javascript - google drive api - copyfile working only with permission for accessing all files in drive (but jst need to copy) -


we can copy using page https://developers.google.com/drive/v2/reference/files/copy.

but working when ask them permission https://www.googleapis.com/auth/drive means can modify file drive bad. need copy public file authenticated user's account.

how can that?

when taking permission https://www.googleapis.com/auth/drive.file, saying, user has not granted write access file file 1 copying..

i using application of type 'web' api console.

according documentation, files.copy() requires @ least 1 of following 3 permissions:

https://www.googleapis.com/auth/drive: "view , manage files , documents in google drive" 1 want avoid

https://www.googleapis.com/auth/drive.file: "view , manage google drive files have opened or created app." means can freely create file open files app created. you can copy file created, cannot copy other files if public.

https://www.googleapis.com/auth/drive.appdata: "view , manage own configuration data in google drive" lets control application-specific appdata folder not want. you can copy file within appdata folder, again, no other files if user has permission access it.

long story short, should use https://www.googleapis.com/auth/drive scope.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -