... | @@ -2,16 +2,22 @@ |
... | @@ -2,16 +2,22 @@ |
|
|
|
|
|
The documentation home is https://developers.google.com/storage/index. The main tool is `gsutil`. Note: due to rapid development a lot of information on the web uses outdated syntax (but is still useful, e.g., https://gist.github.com/mhulse/4362104).
|
|
The documentation home is https://developers.google.com/storage/index. The main tool is `gsutil`. Note: due to rapid development a lot of information on the web uses outdated syntax (but is still useful, e.g., https://gist.github.com/mhulse/4362104).
|
|
|
|
|
|
### Copying: recursively (-R), compressed (-z), verbose (-v) https://developers.google.com/storage/docs/gsutil/commands/cp
|
|
### Copying:
|
|
|
|
|
|
|
|
Notes: recursively (-R), compressed (-z), verbose (-v) https://developers.google.com/storage/docs/gsutil/commands/cp
|
|
|
|
|
|
gsutil cp -Rzv mathjax gs://mathjax-cdn/
|
|
gsutil cp -Rzv mathjax gs://mathjax-cdn/
|
|
|
|
|
|
|
|
|
|
### make bucket public https://developers.google.com/storage/docs/gsutil/commands/acl#set
|
|
### make bucket public
|
|
|
|
|
|
|
|
Notes: https://developers.google.com/storage/docs/gsutil/commands/acl#set
|
|
|
|
|
|
gsutil -m setacl -R -a public-read gs://mathjax-cdn
|
|
gsutil -m setacl -R -a public-read gs://mathjax-cdn
|
|
|
|
|
|
# set CORS (should only be needed once), https://developers.google.com/storage/docs/cross-origin
|
|
# set CORS
|
|
|
|
|
|
|
|
Notes: should only be needed once, https://developers.google.com/storage/docs/cross-origin
|
|
|
|
|
|
create XML file with
|
|
create XML file with
|
|
|
|
|
... | @@ -38,8 +44,12 @@ Save as `cors.xml` and run |
... | @@ -38,8 +44,12 @@ Save as `cors.xml` and run |
|
gsutil cors set cors.xml gs://fonts.acmecompany.com/
|
|
gsutil cors set cors.xml gs://fonts.acmecompany.com/
|
|
|
|
|
|
|
|
|
|
# set headers -- https://developers.google.com/storage/docs/gsutil/commands/setmeta
|
|
# set headers
|
|
|
|
|
|
|
|
Notes: https://developers.google.com/storage/docs/gsutil/commands/setmeta
|
|
|
|
|
|
gsutil setmeta -r -h "Content-Type:font/opentype" -h "Cache-Control:public, max-age=3600" -h "Content-Disposition" gs://mathjax-cdn/mathjax/2.3-latest/fonts/HTML-CSS/TeX/otf/*.otf
|
|
gsutil setmeta -r -h "Content-Type:font/opentype" -h "Cache-Control:public, max-age=3600" -h "Content-Disposition" gs://mathjax-cdn/mathjax/2.3-latest/fonts/HTML-CSS/TeX/otf/*.otf
|
|
|
|
|
|
Note: unfortunately we can't just use gs//mathjax-cdn/*.otf |
|
EOT and SVG are detected correctly during upload. WOFF is set to the old `x-font/woff`, so needs changing (and a bug report at Google).
|
|
\ No newline at end of file |
|
|
|
|
|
Note: unfortunately we can't just use something like gs//mathjax-cdn/*.otf |
|
|
|
\ No newline at end of file |