You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If error occurs, the worker returns status code different from `200`:
73
+
74
+
-`404`: the paste of given name is not found.
75
+
-`500`: unexpected exception. You may report this to the author to give it a fix.
76
+
77
+
Usage example:
78
+
79
+
```shell
80
+
$ curl -L https://shz.al/m/i-p-
81
+
{
82
+
"lastModifiedAt": "2025-05-05T10:33:06.114Z",
83
+
"createdAt": "2025-05-01T10:33:06.114Z",
84
+
"expireAt": "2025-05-08T10:33:06.114Z",
85
+
"sizeBytes": 4096,
86
+
"filename": "a.jpg",
87
+
"location": "KV"
88
+
}
89
+
```
90
+
91
+
Explanation of the fields:
92
+
93
+
-`lastModified`: String. An ISO String representing the last modification time of the paste.
94
+
-`expireAt`: String. An ISO String representing when the paste will expire.
95
+
-`expireAt`: String. An ISO String representing when the paste was created.
96
+
-`sizeBytes`: Integer. The size of the content of the paste in bytes.
97
+
-`filename`: Optional string. The file name of the paste.
98
+
-`location`: String, either "KV" of "R2". Representing whether the paste content is stored in Cloudflare KV storage or R2 object storage.
99
+
68
100
## GET `/a/<name>`
69
101
70
102
Return the HTML converted from the markdown file stored in the paste of name `<name>`. The markdown conversion follows GitHub Flavored Markdown (GFM) Spec, supported by [remark-gfm](https://github.com/remarkjs/remark-gfm).
Request a paste without returning the body. It accepts same parameters as all `GET` requests, and returns the same `Content-Type`, `Content-Disposition`, `Content-Length` and cache control headers with the corresponding `GET` request. Note that the `Content-Length` with `/a/<name>`, `?lang=<lang>` is the length of the paste instead of the length the actuala HTML page.
156
+
121
157
## **POST**`/`
122
158
123
159
Upload your paste. It accept parameters in form-data:
@@ -146,7 +182,7 @@ Upload your paste. It accept parameters in form-data:
146
182
Explanation of the fields:
147
183
148
184
-`url`: String. The URL to fetch the paste. When using a customized name, it looks like `https//shz.al/~myname`.
149
-
-`suggestedUrl`: String or null. The URL that may carry filename or URL redirection.
185
+
-`suggestedUrl`: Optional string. The URL that may carry filename or URL redirection.
150
186
-`manageUrl`: String. The URL to update and delete the paste, which is `url` suffixed by `~` and the password.
151
187
-`expirationSeconds`: String. The expiration seconds.
152
188
-`expireAt`: String. An ISO String representing when the paste will expire.
0 commit comments