@crombolo/content 0.35.2 → 0.36.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/media-operations.ts +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crombolo/content",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.2",
|
|
4
4
|
"description": "Internal to crombolo, with no compatibility promise: use @crombolo/crombolo. The rules every page and media write follows, whoever starts it: who may, where it may go, approvals, and what it announces. No transport.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Crombolo",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@crombolo/core": "0.
|
|
33
|
-
"@crombolo/data": "0.
|
|
32
|
+
"@crombolo/core": "0.36.2",
|
|
33
|
+
"@crombolo/data": "0.36.2"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/src/media-operations.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
memberMay,
|
|
12
12
|
normaliseUuid,
|
|
13
13
|
ObjectTypes,
|
|
14
|
+
SYSTEM_MEDIA_TYPE_KEYS,
|
|
14
15
|
SystemNodes,
|
|
15
16
|
} from '@crombolo/core'
|
|
16
17
|
import {
|
|
@@ -398,7 +399,11 @@ export function createMediaOperations(options: MediaOperationsOptions) {
|
|
|
398
399
|
const doc = await tx.create({ ...fields, componentKey: null, userId })
|
|
399
400
|
// What the folder above says files created in it get.
|
|
400
401
|
const access = new MediaAccessRepository(txDb)
|
|
401
|
-
if (
|
|
402
|
+
if (
|
|
403
|
+
stamp === false ||
|
|
404
|
+
input.contentTypeKey.toLowerCase() === SYSTEM_MEDIA_TYPE_KEYS.Folder
|
|
405
|
+
)
|
|
406
|
+
await access.setCreator(doc.key, creator)
|
|
402
407
|
else await access.stampNew(doc.key, creator)
|
|
403
408
|
return doc
|
|
404
409
|
},
|