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:
parent
d09be4ba42
commit
d1521dde4b
1 changed files with 127 additions and 35 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue