2

Is there any way to add file upload functionality in G-suite app maker?

If any one have any idea please help.

1 Answer 1

2

You have a couple options. (I recommend the first approach because it's by far the easiest, but I went into detail on the second one because I think it's cool ;)

The easiest is to use the Drive Picker widget and enable the upload feature, which will upload the file to the user's drive and provide a link to it (from there you could do whatever you wanted with the file from a Server script).

Alternatively, you could use the HTML widget to create an upload form. Apps Script has a cool bit of functionality that if you pass a form with a file upload element in it to the server, then it sends the blob of the uploaded form to the server script. This post has a decent example of that in Apps Script: Uploading file using Google Apps Script using HtmlService

I haven't tried this, but here are some App Maker specific instructions based on that example:

Create an html widget, click "Allow unsafe HTML" (because we're adding a script to the HTML) and then add this html to it:

And then in a Server Script named serverFunc you can do whatever you want with the blob.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.