mirror of
https://github.com/rikkaneko/paste.git
synced 2025-06-06 08:35:44 +00:00
Add a control to toggle URL redirection to paste.html
Update README.md Signed-off-by: Joe Ma <rikkaneko23@gmail.com>
This commit is contained in:
parent
19c9c69a78
commit
3c900bc92a
3 changed files with 17 additions and 1 deletions
11
README.md
11
README.md
|
@ -18,6 +18,7 @@ Please **DO NOT** abuse this service.
|
|||
- [ ] Expiring paste (*not support directly, see [this section](#expiring-paste)*)
|
||||
- [ ] Render paste code with syntax highlighting
|
||||
- [x] Generate QR code for paste link
|
||||
- [x] Support URL redirection using [HTTP status codes 301](https://en.wikipedia.org/wiki/URL_redirection#HTTP_status_codes_3xx)
|
||||
|
||||
## Service architecture
|
||||
|
||||
|
@ -117,6 +118,7 @@ Add `?qr=1` to enable QR code generation for paste link.
|
|||
|`pass`|Paste's password|
|
||||
|`read-limit`|The maximum access count|
|
||||
|`qrcode`|Toggle QR code generation|
|
||||
|`paste-type`|Set paste type|
|
||||
|
||||
#### For raw request,
|
||||
|
||||
|
@ -126,9 +128,17 @@ Add `?qr=1` to enable QR code generation for paste link.
|
|||
|`x-title`|File's title|
|
||||
|`x-pass`|Paste's password|
|
||||
|`x-read-limit`|The maximum access count|
|
||||
|`x-paste-type`|Set paste type|
|
||||
|
||||
The request body contains the upload content.
|
||||
|
||||
#### Paste type
|
||||
|
||||
|Type|Description|
|
||||
|-|-|
|
||||
|`paste`|Normal paste content|
|
||||
|`link`|URL link to be redirected|
|
||||
|
||||
### GET /\<uuid\>/\<option\> (Not implemented)
|
||||
|
||||
Fetch the paste (code) in rendered HTML with syntax highlighting
|
||||
|
@ -139,6 +149,7 @@ Currently, only the following options is supported for `option`
|
|||
|`settings`|Fetch the paste information|
|
||||
|`download`|Download paste as attachment|
|
||||
|`raw`|Display paste as plain text|
|
||||
|`link`|Treat paste content as URL link|
|
||||
|
||||
*The authentication requirement is as same as `GET /<uuid>`.*
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<div>
|
||||
<h4>Upload text</h4>
|
||||
<textarea id="text_input" style="width: 30%; max-width: 100%; " rows="5" cols="50"
|
||||
name="u" placeholder="" spellcheck="false"></textarea>
|
||||
name="u" placeholder="Paste text or URL link here..." spellcheck="false"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Settings</h4>
|
||||
|
@ -63,6 +63,10 @@
|
|||
<input id="show_qr_checkbox" type="checkbox" name="qrcode" checked>
|
||||
<label for="show_qr_checkbox">Show QR code on sumbitted</label>
|
||||
</div>
|
||||
<div>
|
||||
<input id="gen_link" type="checkbox" name="paste-type" value="link">
|
||||
<label for="gen_link">Generate as shorten URL link</label>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<input id="reset_button" type="reset" value="Reset">
|
||||
|
|
|
@ -58,6 +58,7 @@ GET /<uuid>/<option> Fetch the paste (code) in rendered HTML with syntax hi
|
|||
# content-type: The media type (MIME) of the data and encoding, i.e., text/plain; charset=UTF-8;
|
||||
# pass: Paste password
|
||||
# read-limit: Limit access times to paste to <read-limit>
|
||||
# paste-type: Set paste type (Available: paste, link)
|
||||
POST / Create new paste [x]
|
||||
|
||||
DELETE /<uuid> Delete paste by uuid [x]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue