You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have been searching hi and low for an answer to my problem but have not found anything.
I am trying to output ggplot plots to specific Google Drive folders but am not having any luck. I imagine it is the scope I am using in drive_auth().
I am not interested in allowing full access to my Google Drive (i.e., scope="drive"), and only want to access certain folders. I tried scope="drive.file" hoping this would work, but I have not been able to save any output to a specific folder.
this is what my drive_upload code looks like:
drive_upload(media="Output/Plots/plot.jpeg",
path=as_id("1OGVyempjkFEH7IPqC0D9-lncpqwPN-Pf"),
name="plot",
type="jpeg")
Is allowing access to only certain folders possible?
The text was updated successfully, but these errors were encountered:
Is allowing access to only certain folders possible?
The short, probably somewhat oversimplified answer is "no".
At a very high-level, I think you have 2 ways forward:
Use a service account for whatever script or data product we're talking about here. And grant that service account the necessary permissions on the specific folder. And grant it nothing else.
Maybe something is possible with the drive.appdata and drive.appfolder scopes? But honestly I can't see how that would really work because Google's notion of an "app" is so far from how we R users use the APIs. A constant source of pain. This pain is related to your experience of drive.file not doing what you want either.
But, no, I am not aware of any way to connect the concept of scopes and a specific folder in Drive. This sort of restricted access will always have to be accomplished by some doing the work as some sort of user or agent and then applying the limits/privileges you want to that user.
Hi,
I have been searching hi and low for an answer to my problem but have not found anything.
I am trying to output ggplot plots to specific Google Drive folders but am not having any luck. I imagine it is the scope I am using in drive_auth().
I am not interested in allowing full access to my Google Drive (i.e., scope="drive"), and only want to access certain folders. I tried scope="drive.file" hoping this would work, but I have not been able to save any output to a specific folder.
this is what my drive_upload code looks like:
drive_upload(media="Output/Plots/plot.jpeg",
path=as_id("1OGVyempjkFEH7IPqC0D9-lncpqwPN-Pf"),
name="plot",
type="jpeg")
Is allowing access to only certain folders possible?
The text was updated successfully, but these errors were encountered: