problem_copy

This commit is contained in:
undefined committed 2020-07-23 13:34:20 +08:00
1 parent 37756c3724
commit 9e96c471af
14 files changed
+118 -159

No files matched your search

+2 -1
View File
@@ -8,7 +8,7 @@ import * as user from '../model/user';
import * as markdown from '../lib/markdown';
import * as db from '../service/db';
import {
Route, Handler, Types, param,
Route, Handler, Types, param, multipart,
} from '../service/server';
import { BadRequestError } from '../error';
@@ -39,6 +39,7 @@ class FileUploadHandler extends Handler {
this.response.body = { fdoc: null, usage: this.user.usage, quota: await this.getQuota() };
}
@multipart(256 * 1024)
@param('title', Types.String)
async post(domainId: string, title: string) {
if (!this.request.files.file) throw new BadRequestError();