Elegant way to store resources (icons, images etc) for a Google Apps Script webapp

Viewed 2623

Now that it is possible to make non-container-bound webapps, it would make sense to be able to put the app's resources (e.g. some icons and images, perhaps a legacy database etc) into the app - perhaps in a similar way that you can add further .gs files to a project. This would mean they don't have to be uploaded to some external service and then referenced, and the web-app would be self-contained. Is there already a way to do this, or should I put in a feature request?

2 Answers

Almost ten years later the situation is almost the same about keeping together the related resources of a Google Apps Script web-application, we still have to store resources in another place but there are a lot of changes that might be worthy to consider.

It is still possible to link files stored in Google Drive by using URLs like https://docs.google.com/uc?export=download&id=ID / https://docs.google.com/uc?export=view&id=ID but Google Drive have limits about how many "hits" could have a file. For low-users web-apps it's very likely that this will not be a problem.

Now Google Apps Script projects could be linked to Google Cloud Standard Projects. This is necessary to customize the OAuth Consent Screen and in order to be able to use some features of Google services. It might be worthy to review the Google Cloud file hosting services including Firebase.

By the way there are some things that are no longer available

  1. Now there is a new Google Sites, but Google Apps Script Sites service doesn't support them.
  2. Google Drive web-page hosting was retired
Related