0

So I have followed the tutorial here, and everything works great... for me.
google forms file upload complete example

What I need to do is add the script to a Google Form, and allow users to upload an image along with the form. I know it will only put it the uploaded image in the folder specified, but that's fine, there won't be a huge number and we can just use the corresponding time stamp.

The problem I have is that everything works exactly as I expect when I open the form, follow the link, and am able to upload the image, but when I try to share it with someone outside of my domain (it's a google for business account), the form works, but the link to the script gives me the old:

Sorry, the file you have requested does not exist. Please check the address and try again. Get stuff done with Google Drive Apps in Google Drive make it easy to create, store and share online documents, spreadsheets, presentations and more. Learn more at drive.google.com/start/apps.

I have shared both the Form and the script with a test gmail user.
I have published the script as a webapp.
The version has been manage and updated, and is the latest.
I've even shared the folder it will upload images into, but it's not getting that far, as it won't even load the script.

Everything else I can find online about sharing google-apps-script is about collaborating with developers, and giving them access to your code, which is the last thing I want to do. I don't know enough about Google-drive and especially google-script to take this troubleshooting any further. Any one have an idea what's going on here?

danny2327
  • 97
  • 12

1 Answers1

2

You don't have to share the script.

The only thing that matters is the way you deploy your webapp : you have to make it execute as you and specify that anyone can use, even anonymous, meaning that the webapp users don't need to log in to use the app. It means also -obviously- that you won't be able to know who is using the app. If you restrict the webapp access to your domain users then they'll have to log in and even if the script runs "as you", you will still be able to identify the effective user.

Parameters illustrated below (there are more possibilities when you deploy it from a Google Apps account, for example you can restrict to your domain... but my domain is in french so I preferred to show a more "standard" example)

enter image description here

Serge insas
  • 45,904
  • 7
  • 105
  • 131
  • This appears to be the problem. I do not have that option, I only have 'Only Me' or 'Anyone in my domain'. I'm investigating now as to why. Thanks, – danny2327 Jun 22 '15 at 16:43
  • Same issue. I made a web app as a Google workspace domain user in my organization. While deploying, under 'Who has access to the app', I get 'Anyone with a Google account' as well as 'Anyone, even anonymous'. However, the script executes properly only for users in my domain, and not for others. Any clues? – user1327454 Oct 23 '22 at 05:43
  • PS: I need users to sign in because the app script needs the email address of the user. – user1327454 Oct 23 '22 at 06:29