Add new Dataset ORM tutorial page covering CRUD operations, query operators, schema evolution, and JSON field handling. Update navigation.yaml to include the new tutorial in the tutorials section. Enhance markdown module documentation with GitHub Flavored Markdown support details including tables, task lists, and language identifier attributes for syntax highlighting. Update tutorial index page and pagination links to reflect the new tutorial order. Refactor dataset.wren module source to introduce Sql and QueryBuilder classes with soft-delete support and identifier validation.
27 lines
934 B
JavaScript
Vendored
27 lines
934 B
JavaScript
Vendored
// retoor <retoor@molodetz.nl>
|
|
|
|
import "web" for Request
|
|
|
|
var body = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\n" +
|
|
"Content-Disposition: form-data; name=\"description\"\r\n" +
|
|
"\r\n" +
|
|
"Test file description\r\n" +
|
|
"------WebKitFormBoundary7MA4YWxkTrZu0gW\r\n" +
|
|
"Content-Disposition: form-data; name=\"file\"; filename=\"test.txt\"\r\n" +
|
|
"Content-Type: text/plain\r\n" +
|
|
"\r\n" +
|
|
"Hello, World!\r\n" +
|
|
"------WebKitFormBoundary7MA4YWxkTrZu0gW--\r\n"
|
|
|
|
var headers = {
|
|
"Content-Type": "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
|
|
}
|
|
|
|
var request = Request.new_("POST", "/upload", {}, headers, body, {}, null)
|
|
var form = request.form
|
|
|
|
System.print(form["description"]) // expect: Test file description
|
|
System.print(form["file"]["filename"]) // expect: test.txt
|
|
System.print(form["file"]["content"]) // expect: Hello, World!
|
|
System.print(form["file"]["content_type"]) // expect: text/plain
|