6

I have tried gsutil cp -z "js, css, html" file/name gs://bucket/name

Only file type that compressed is js but other type remain uncompress.

Can cp -z command upload and compress multiple file type?

Any suggestion would be appreciate.

Thanks in advance.

jterrace
  • 64,866
  • 22
  • 157
  • 202
sthapaun
  • 310
  • 1
  • 3
  • 8

1 Answers1

13

Please remove the extra whitespace in the file extension list:

gsutil cp -z "js,css,html" file/name gs://bucket/name

I'm going to change the gsutil code to make it ignore the whitespace, so this is less confusing.

jterrace
  • 64,866
  • 22
  • 157
  • 202
Mike Schwartz
  • 11,511
  • 1
  • 33
  • 36
  • I'm using "gsutil -m cp -z html -r dist gs:/bucket", but my HTML files do not have a Content-Encoding header. Any ideas what I'm doing wrong? – Matt Raible Oct 06 '15 at 21:25
  • 1
    I figured it out - I was copying files to the wrong directory. I changed it to be "gsutil -m cp -z "html,js,css" -r dist/** gs:/bucket" and everything works now. – Matt Raible Oct 07 '15 at 19:44