mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
Commit Message Generated by Copilot
Enhance date handling, error checks, data limits, and rate limiting - Added `using System.Globalization;` to support date and time formatting. - Handled empty/null paste titles with defaults and truncation. - Display paste dates as human-readable time differences. - Changed rate limiting policy to "fixed-bigger". - Improved error handling for `/api/create` endpoint. - Updated `ConvertToBytes` method for clarity. - Added `GetDifference` method for date comparisons. - Enforced length limits on input fields in `index.html`.
This commit is contained in:
@@ -17,9 +17,9 @@
|
||||
<h1>create paste</h1>
|
||||
<form id="createForm">
|
||||
<label for="pasteTitle" class="label">Title</label>
|
||||
<input type="text" id="pasteTitle" class="textinput" name="pasteTitle">
|
||||
<input type="text" id="pasteTitle" class="textinput" name="pasteTitle" maxlength="500">
|
||||
<label for="pasteContent" class="label">Content</label>
|
||||
<textarea id="pasteContent" class="textarea" name="pasteContent" required ></textarea>
|
||||
<textarea id="pasteContent" class="textarea" name="pasteContent" required maxlength="500000"></textarea>
|
||||
<button type="submit" class="button">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user