A lot of not only Google Apps Script developers and users have used Google Drive feature to host any file as webhosting. It was useful for CSS files, images, JavaScript libraries, which can be used in code. Deployment was very easy - you have just copied files into specific folder and change sharing options.
Google recently announced, that hosting feature will be deprecated (more information here). Users have, according to deprecation policy, one year to find out a new place where to store files.
I was thinking about several options, so I would like to bring some alternatives.
The first one is Google Storage, which is a part of Google Cloud platform
The main advantage is connection with App Script. Every Apps Script project has also Cloud project in Developers console (http://console.developers.google.com)
From Google Apps Script editor choose Resources --> Advanced Google services
In the new window, click at link "These services must also be enabled in the Google Developers Console."
In Developer console, select Storage - Cloud storage. If you open console for the first time, you have to click button Enable billing (In this section you will fill in credentials like your name or number of credit card)
Now it is time to Create a bucket. Have you ever heard about it? The bucket is virtual space, where your objects (files) are stored. You can have serveral buckets for one Cloud project
Select name of the bucket. Important - this name must be unique in all Google Cloud Storage platform
Now you can create a new folder inside the bucket and upload files - by clicking button or drag'n'drop like in Google Drives. It is similar, isn't it ?
The last thing is publish on the web by click on checkbox
The final URI will like:
- How much data do you need to store ? (1GB per month = $0.026)
- How many requests do you do? (10 000 requests for $0.01)
- What is total traffic through your bucket ( 1GB of traffic in EMEA/AMERICA= $0.12)
So if you are planning to host 10 MB ($0.01) with total loading 100 000x ($0.01) and traffic 1GB ($0.12), you will finally get receipt $0.14 for month!
Are you interested in this topic? Follow me on Twitter or subscribe RSS
Tweet |