WIP: File Preview support

This commit is contained in:
Eibriel
2015-05-08 11:28:58 -03:00
parent 7c68cb7fb4
commit 405b3c0a3d
3 changed files with 141 additions and 38 deletions

View File

@@ -9,7 +9,7 @@ RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
# individual items (defaults to read-only item access).
ITEM_METHODS = ['GET', 'PUT', 'DELETE', 'PATCH']
PAGINATION_LIMIT = 100
PAGINATION_LIMIT = 999
# To be implemented on Eve 0.6
# RETURN_MEDIA_AS_URL = True
@@ -144,6 +144,12 @@ files_schema = {
'type': 'string',
'required': True,
},
'is_preview': {
'type': 'boolean'
},
'preview_name': {
'type': 'string'
},
'user': {
'type': 'objectid',
'required': True,
@@ -176,6 +182,18 @@ files_schema = {
'path': {
'type': 'string',
'required': True,
'unique': True,
},
'previews': {
'type': 'list',
'schema': {
'type': 'objectid',
'data_relation': {
'resource': 'files',
'field': '_id',
'embeddable': True
}
}
}
}