docs: def put(self, store, obj):
          """
          put an object in external store
          """
          spec = self._get_store_spec(store)
          blob = pack(obj)
          blob_hash = long_hash(blob) + store[len('external-'):]
          if spec['protocol'] == 'file':
              folder = os.path.join(spec['location'], self.database)
              full_path = os.path.join(folder, blob_hash)
              if not os.path.isfile(full_path):
                  try:
                      safe_write(full_path, blob)
                  except FileNotFoundError:
                      os.makedirs(folder)
                      safe_write(full_path, blob)
          elif spec['protocol'] == 's3':
              S3Folder(database=self.database, **spec).put(blob_hash, blob)
          else:
              raise DataJointError('Unknown external storage protocol {protocol} for {store}'.format(
                  store=store, protocol=spec['protocol']))
  
          # insert tracking info
          self.connection.query(
              "INSERT INTO {tab} (hash, size) VALUES ('{hash}', {size}) "
              "ON DUPLICATE KEY UPDATE timestamp=CURRENT_TIMESTAMP".format(
                  tab=self.full_table_name,
                  hash=blob_hash,
                  size=len(blob)))
          return blob_hash