fix MagicCap support

MagicCap (and others) upload files differently than ShareX, change allows for it.
This commit is contained in:
ToastDC 2020-05-19 16:44:43 -07:00 committed by GitHub
parent 21db8ca721
commit 56617b753d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,9 @@ async function files(req, res) {
// eslint-disable-next-line no-param-reassign
files.fdata = files.fdataUploader;
}
if (files.file) {
files.fdata = files.file;
}
if (!this.auth(this.c.key, fields.key, this.c) && usingUploader === false) {
res.statusCode = 401;
res.write('Unauthorized');