fds
This commit is contained in:
parent
a078f9c5e6
commit
da0dd585fb
17 changed files with 47 additions and 49 deletions
|
@ -139,8 +139,8 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
|
|||
@validate_formkey
|
||||
def api_comment(v):
|
||||
if v and v.patron:
|
||||
if request.content_length > 8 * 1024 * 1024: return "Max file size is 8 MB.", 413
|
||||
elif request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}, 413
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}, 413
|
||||
|
||||
parent_submission = request.values.get("submission").strip()
|
||||
parent_fullname = request.values.get("parent_fullname").strip()
|
||||
|
@ -579,8 +579,8 @@ def api_comment(v):
|
|||
@validate_formkey
|
||||
def edit_comment(cid, v):
|
||||
if v and v.patron:
|
||||
if request.content_length > 8 * 1024 * 1024: return "Max file size is 8 MB.", 413
|
||||
elif request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}, 413
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}, 413
|
||||
|
||||
c = get_comment(cid, v=v)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue