From 51d74db190ba898af9f62906ccfd1da097330fb4 Mon Sep 17 00:00:00 2001 From: Sophie Zhang Date: Fri, 22 Sep 2023 03:14:03 -0400 Subject: fix: fix report manager for videos, only add _l suffix for images --- src/client/util/reportManager/ReportManager.tsx | 28 +++++++--------------- .../util/reportManager/reportManagerUtils.ts | 3 --- src/server/ApiManagers/UploadManager.ts | 9 +++---- 3 files changed, 14 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/client/util/reportManager/ReportManager.tsx b/src/client/util/reportManager/ReportManager.tsx index 802a2f09f..e8c69f909 100644 --- a/src/client/util/reportManager/ReportManager.tsx +++ b/src/client/util/reportManager/ReportManager.tsx @@ -333,25 +333,15 @@ export class ReportManager extends React.Component<{}> { fillWidth /> - - {({ getRootProps, getInputProps }) => ( -
- -
- -

Drop or select media that shows the bug (optional)

-
-
- )} -
+ { + if (!e.target.files) return; + this.setFormData({ ...this.formData, mediaFiles: [...this.formData.mediaFiles, ...Array.from(e.target.files).map(file => ({ _id: v4(), file }))] }); + }} + /> {this.formData.mediaFiles.length > 0 && } {this.submitting ? (