An elegant way to store resources (icons, images, etc.) For Google Apps Script webapp

Now that you can create container-bound web applications, it would be wise to place application resources in the application (for example, some icons and images, possibly an outdated database, etc.), perhaps in a similar way that you can add additional .gs files to the project. This would mean that they do not need to be uploaded to any external service and then referenced, and the web application will be self-sufficient. Is there a way to do this, or do I need to add a function request?

+6
source share
1 answer

What suits me very well is to put Google Apps Script in a folder in Google Drive and add all other resources to this folder. You can then directly link them using the download link if you transfer them to everyone who has the link.

eg. The file with the ID can be linked using https://docs.google.com/uc?export=download&id=ID . You can even link to specific versions (right-click on a file in Google Drive and open the version dialog to find out the revision key, then add &revid=REVISION_TOKEN to your URL).

Its not 100% autonomous, in a sense you can just copy all the resources somewhere and make it work in a dash, but the beauty of this solution is that hosting is provided by Google and most likely will have the same availability. as in Google Apps Script.

+6
source

Source: https://habr.com/ru/post/921130/


All Articles