core (memory/sqlite): new database schema (v9):

this new schema brings the new `public_id` column, which will be used to serve files via
HTTP, splits `mime_type` in 2 (`media_type` and `media_subtype`) to make indexing/media
filtering easier, and fixes indexes for `files` table.
This commit is contained in:
Goffi 2020-05-29 21:50:49 +02:00
commit d1521dde4b

View file

@ -381,9 +381,9 @@ class FileSharingManagement(object):
yield self._genThumbs(client, requestor, namespace, sub_file_data)
elif file_data['type'] == C.FILE_TYPE_FILE:
mime_type = file_data['mime_type']
media_type = file_data['media_type']
file_path = os.path.join(self.files_path, file_data['file_hash'])
if mime_type is not None and mime_type.startswith("image"):
if media_type == 'image':
thumbnails = []
for max_thumb_size in (self._t.SIZE_SMALL, self._t.SIZE_MEDIUM):