AddTorrentByFile: use base64 instead of Blob to transfer file

This commit is contained in:
Jesse Chan
2020-09-29 22:17:59 +08:00
parent b0bd3c1b6e
commit c6f8b9b76d
11 changed files with 127 additions and 208 deletions
-11
View File
@@ -1,11 +0,0 @@
import type {Request, Response, NextFunction} from 'express';
export default (key: string) => (req: Request, _res: Response, next: NextFunction) => {
const value = req.body && req.body[key];
if (value && typeof value === 'string') {
req.body[key] = value === 'true';
}
next();
};