Skip to content

Commit

Permalink
Merge pull request #1994 from lukecampbell/qcprocess
Browse files Browse the repository at this point in the history
CIDEVSTC-284 - Adds ZIP file detection for upload in prep for LRT
  • Loading branch information
lukecampbell committed Apr 7, 2014
2 parents 141de3f + faa1539 commit 9184186
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ion/services/coi/service_gateway_service.py
Expand Up @@ -1063,4 +1063,11 @@ def _check_magic(f):
HDF = f.read(8)
if HDF == HDF_MAGIC:
return 'HDF'

# PKZIP
ZIP_MAGIC = b"\x50\x4b\x03\x04"
f.seek(0)
ZIP = f.read(4)
if ZIP == ZIP_MAGIC:
return 'ZIP'
return None

0 comments on commit 9184186

Please sign in to comment.