MCPcopy Create free account
hub / github.com/s3tools/s3cmd / add_encoding

Method add_encoding

S3/S3.py:730–743  ·  view source on GitHub ↗
(self, filename, content_type)

Source from the content-addressed store, hash-verified

728 return content_type
729
730 def add_encoding(self, filename, content_type):
731 if 'charset=' in content_type:
732 return False
733 exts = self.config.add_encoding_exts.split(',')
734 if exts[0]=='':
735 return False
736 parts = filename.rsplit('.',2)
737 if len(parts) < 2:
738 return False
739 ext = parts[1]
740 if ext in exts:
741 return True
742 else:
743 return False
744
745 def object_put(self, filename, uri, extra_headers = None, extra_label = ""):
746 # TODO TODO

Callers 1

content_typeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected