url:
    uploadhandler/upload:
        pattern: /$YAMLURL/upload
        handler: UploadHandler
        kwargs:
            path: $GRAMEXDATA/apps/guide/upload/    # ... save files here
            methods: get                            # GET /upload returns file info as JSON
            redirect:                               # After uploading the file,
                query: next                         #   ... redirect to ?next=
                url: /$YAMLURL/form                 #   ... else to this url

    uploadhandler/form:
        pattern: /$YAMLURL/form
        handler: FileHandler
        kwargs:
            path: $YAMLPATH/form.html
            template: true
