Code Repositories xandikos / 2ac0b14
Allow empty content_type to Store.import_one. Jelmer Vernooń≥ 2 years ago
1 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
377377 :raise DuplicateUidError: when the uid already exists
378378 :return: etag
379379 """
380 fi = open_by_content_type(data, content_type, self.extra_file_handlers)
380 if content_type is None:
381 fi = open_by_extension(data, name, self.extra_file_handlers)
382 else:
383 fi = open_by_content_type(data, content_type, self.extra_file_handlers)
381384 if name is None:
382385 name = str(uuid.uuid4())
383386 extension = MIMETYPES.guess_extension(content_type)