encryption works

This commit is contained in:
Chris Lu
2020-03-07 11:08:57 -08:00
parent 0375ce2c2e
commit 9228ff192c
3 changed files with 3 additions and 9 deletions

View File

@@ -62,7 +62,7 @@ func doUpload(uploadUrl string, filename string, cipher bool, reader io.Reader,
contentIsGzipped := isGzipped
shouldGzipNow := false
if !isGzipped {
if shouldBeZipped, iAmSure := util.IsGzippableFileType(filepath.Base(filename), mtype); iAmSure && shouldBeZipped {
if shouldBeZipped, iAmSure := util.IsGzippableFileType(filepath.Base(filename), mtype); mtype == "" || iAmSure && shouldBeZipped {
shouldGzipNow = true
contentIsGzipped = true
}