Added project property for files

This property can be combined to the backend for locating the file
within the backed. Originally introduced to support Google Cloud
Storage (where every project is store in its own bucket, named after
the project id).
This commit is contained in:
2015-11-04 12:57:36 +01:00
parent 81f4865b8d
commit 9c18b5cc9f

View File

@@ -388,13 +388,25 @@ files_schema = {
'backend': {
'type': 'string',
'required': True,
'allowed': ["attract-web", "pillar", "cdnsun"]
'allowed': ["attract-web", "pillar", "cdnsun", "gcs"]
},
'path': {
'type': 'string',
#'required': True,
'unique': True,
},
'project': {
# The project node the files belongs to (does not matter if it is
# attached to an asset or something else). We use the project id as
# top level filtering, folder or bucket name. Later on we will be able
# to join permissions from the project and verify user access.
'type': 'objectid',
'data_relation': {
'resource': 'nodes',
'field': '_id',
'embeddable': True
},
},
'previews': { # Deprecated (see comments above)
'type': 'list',
'schema': {