Quellcode durchsuchen

add log to check

Dave vor 1 Monat
Ursprung
Commit
1a552437b1

+ 14 - 0
apps/box-mgnt-api/src/mgnt-backend/feature/uploader/uploader.service.ts

@@ -221,6 +221,20 @@ export class UploaderService {
       }
     }
     if (!source) {
+      const fileAny = file as any;
+      const debug = {
+        hasFile: !!file,
+        fileKeys: file ? Object.keys(fileAny) : [],
+        fileTypes: {
+          file: typeof fileAny?.file,
+          buffer: typeof fileAny?.buffer,
+          value: typeof fileAny?.value,
+          data: typeof fileAny?.data,
+          toBuffer: typeof fileAny?.toBuffer,
+        },
+      };
+      // eslint-disable-next-line no-console
+      console.warn('Uploader: missing stream source', debug);
       throw new BadRequestException('Upload stream is missing');
     }