diff --git a/extensions/template-type.md b/extensions/template-type.md new file mode 100644 index 0000000..adacd5f --- /dev/null +++ b/extensions/template-type.md @@ -0,0 +1,22 @@ +# Template Type + +Support a template type field that instructs the client with which content-type to submit the template. + +```json +{ "collection" : + { + "version" : "1.0", + "href" : "http://example.org/photos", + + "template" : { + "type": "multipart/form-data", + "data" : [ + {"name" : "title", "value" : "", "prompt" : "Title"} + ] + } + } +} +``` + +### References +1. https://groups.google.com/forum/#!topic/collectionjson/Mk7M1w35XSs diff --git a/extensions/template-upload.md b/extensions/template-upload.md new file mode 100644 index 0000000..7f8a675 --- /dev/null +++ b/extensions/template-upload.md @@ -0,0 +1,25 @@ +# Template Upload + +Support a field in a template to instruct the client to submit a file for the specified name. + +This extension requires support for [template-type](template-type.md) + +```json +{ "collection" : + { + "version" : "1.0", + "href" : "http://example.org/photos", + + "template" : { + "type": "multipart/form-data", + "data" : [ + {"name" : "title", "value" : "", "prompt" : "Title"}, + {"name" : "image", "value" : "", "prompt" : "Image", "file": true} + ] + } + } +} +``` + +### References +1. https://groups.google.com/forum/#!topic/collectionjson/Mk7M1w35XSs