diff --git a/example/public/page-data/index/page-data.json b/example/public/page-data/index/page-data.json index 0573361..ecb9e41 100644 --- a/example/public/page-data/index/page-data.json +++ b/example/public/page-data/index/page-data.json @@ -1 +1 @@ -{"componentChunkName":"component---src-templates-page-js","path":"/","result":{"data":{"page":{"id":"04188964-f833-59d9-98db-1d6208773c69","html":"

tinacms-fields

\n

Hey! Welcome to my personal fields playground!\nNavigate to the page of a field to get more instructions.

\n

Credits

\n

Created by Marc Mintel

","frontmatter":{"slug":"/","title":"tinacms-fields","showContent":true},"fileRelativePath":"/src/pages/index.md","rawMarkdownBody":"# tinacms-fields\n\nHey! Welcome to my personal fields playground!\nNavigate to the page of a field to get more instructions.\n\n## Credits\n\nCreated by Marc Mintel","rawFrontmatter":"{\"title\":\"tinacms-fields\",\"slug\":\"/\",\"showContent\":true,\"file\":\"\"}"},"navigation":{"main":[{"title":"Home","slug":"/","link":null,"internal":true},{"title":"Condition Field","slug":"/condition","link":null,"internal":true},{"title":"Relation Field","slug":null,"link":null,"internal":true},{"title":"Blog","slug":null,"link":"https://mintel.me","internal":false}],"rawJson":"{\"main\":[{\"title\":\"Home\",\"internal\":true,\"slug\":\"/\",\"page\":\"04188964-f833-59d9-98db-1d6208773c69\"},{\"title\":\"Condition Field\",\"internal\":true,\"slug\":\"/condition\",\"page\":\"0fbaac30-f53b-5e10-83b9-64d325ac5833\"},{\"title\":\"Relation Field\",\"internal\":true,\"page\":\"ffbe280b-84f2-5902-9756-f6146149b5c1\"},{\"title\":\"Blog\",\"internal\":false,\"link\":\"https://mintel.me\"}],\"__gatsby_resolved\":{\"fileRelativePath\":\"/src/data/navigation.json\"}}","fileRelativePath":"/src/data/navigation.json"}},"pageContext":{"slug":"/"}}} \ No newline at end of file +{"componentChunkName":"component---src-templates-page-js","path":"/","result":{"data":{"page":{"id":"04188964-f833-59d9-98db-1d6208773c69","html":"

tinacms-fields

\n

Hey! Welcome to my personal fields playground!\nNavigate to the page of a field to get more instructions.

\n

Credits

\n

Created by Marc Mintel

","frontmatter":{"slug":"/","title":"tinacms-fields","showContent":true},"fileRelativePath":"/src/pages/index.md","rawMarkdownBody":"# tinacms-fields\n\nHey! Welcome to my personal fields playground!\nNavigate to the page of a field to get more instructions.\n\n## Credits\n\nCreated by Marc Mintel","rawFrontmatter":"{\"title\":\"tinacms-fields\",\"slug\":\"/\",\"showContent\":true}"},"navigation":{"main":[{"title":"Home","slug":"/","link":null,"internal":true},{"title":"Condition Field","slug":"/condition","link":null,"internal":true},{"title":"Relation Field","slug":null,"link":null,"internal":true},{"title":"Blog","slug":null,"link":"https://mintel.me","internal":false}],"rawJson":"{\"main\":[{\"title\":\"Home\",\"internal\":true,\"slug\":\"/\",\"page\":\"04188964-f833-59d9-98db-1d6208773c69\"},{\"title\":\"Condition Field\",\"internal\":true,\"slug\":\"/condition\",\"page\":\"0fbaac30-f53b-5e10-83b9-64d325ac5833\"},{\"title\":\"Relation Field\",\"internal\":true,\"page\":\"ffbe280b-84f2-5902-9756-f6146149b5c1\"},{\"title\":\"Blog\",\"internal\":false,\"link\":\"https://mintel.me\"}],\"__gatsby_resolved\":{\"fileRelativePath\":\"/src/data/navigation.json\"}}","fileRelativePath":"/src/data/navigation.json"}},"pageContext":{"slug":"/"}}} \ No newline at end of file diff --git a/example/src/pages/index.md b/example/src/pages/index.md index 8a8758e..b6a8a18 100644 --- a/example/src/pages/index.md +++ b/example/src/pages/index.md @@ -2,7 +2,6 @@ title: tinacms-fields slug: / showContent: true -file: '' --- # tinacms-fields diff --git a/example/src/templates/page.js b/example/src/templates/page.js index 0e1b975..15dbe7e 100644 --- a/example/src/templates/page.js +++ b/example/src/templates/page.js @@ -27,6 +27,7 @@ const editPageForm = { description: 'This is a pdf upload field', label: 'PDF', accept: 'application/pdf', + parse: (file) => `../uploads/${file}`, uploadDir: () => 'src/uploads', }, { diff --git a/packages/tinacms-file-field/README.md b/packages/tinacms-file-field/README.md index f75a667..d505f24 100644 --- a/packages/tinacms-file-field/README.md +++ b/packages/tinacms-file-field/README.md @@ -60,6 +60,7 @@ You can also specify to accept only specific MIME types, change the default uplo label: 'PDF', accept: 'application/pdf', clearable: true, + parse: (file) => `../uploads/${file}`, uploadDir: () => 'src/uploads', }, ```