summaryrefslogtreecommitdiff
path: root/examples/index.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-02-23 20:31:19 +0100
committerJules Laplace <julescarbon@gmail.com>2021-02-23 20:31:19 +0100
commit464991b62e4fa6141449ca0c5980fcf0af3097a6 (patch)
tree18e597dc951cbf4605995e3aa1b1f8761449549f /examples/index.js
parent19516de0a43ac5f2b0afc9891bbef09d229ce4e6 (diff)
upload files and write to diskv0.3.0
Diffstat (limited to 'examples/index.js')
-rw-r--r--examples/index.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/examples/index.js b/examples/index.js
index f08c752..729c574 100644
--- a/examples/index.js
+++ b/examples/index.js
@@ -69,6 +69,11 @@ var app = okcms
image: { type: "image" },
images: { type: "triple-captioned-image-list" },
},
+ filez: {
+ id: { type: "string", hidden: true },
+ title: { type: "string" },
+ file: { type: "file" },
+ },
},
resources: [
@@ -77,6 +82,7 @@ var app = okcms
{ type: "bread" },
{ type: "test" },
{ type: "flour" },
+ { type: "filez" },
],
services: {
@@ -85,6 +91,10 @@ var app = okcms
secret: process.env.S3_SECRET,
bucket: process.env.S3_BUCKET,
dirname: "okcms-example",
+ local: {
+ localPath: "/Users/user/Sites/okcms/examples/public/uploads/",
+ remotePath: "/uploads/",
+ },
image: {
allowed: true,
preserveFilename: false,
@@ -163,7 +173,7 @@ var app = okcms
"/contact": {
data: { type: "page", query: "contact" },
},
- "/:id": {
+ "/bread/:id": {
data: { type: "bread", query: ":id" },
},
},