0
votes

I have been able to upload files to a Google Drive account from within a Google Spreadsheet. The problem is that as far as I am able, I can only upload files to the currently logged in account.

Is it possible to be logged in with account A and viewing a spreadsheet, but upload files to account B from a menu option? Is this even allowed/possible?

Use Case: I have a spreadsheet with a couple of sheets. A user login will only have access to edit one sheet on the spreadsheet, but as part of that sheet the user should be able to upload photos to the spreadsheet owners google drive. So the main "admin" account holds the spreadsheet and photos and then there are a couple of edit accounts with edit rights to a specific sheet.

2

2 Answers

1
votes

Can you provide your Use Case for this?

It is possible to add Editors to the document (https://developers.google.com/apps-script/class_file) which may be what you are looking to accomplish.

More details would help.

0
votes

You should publish your script as a web app. When you do that, you will be provided the option of executing the script as you(owner of the script) or as the user running the script. Use the latter option to upload files to the user's Google Drive