fastify-file-upload icon indicating copy to clipboard operation
fastify-file-upload copied to clipboard

Property 'files' does not exist on type 'IncomingMessage'.ts(2339)

Open bkawk opened this issue 3 years ago • 4 comments

Screenshot 2022-03-11 at 23 06 41

bkawk avatar Mar 11 '22 23:03 bkawk

Screenshot 2022-03-11 at 23 06 41

Hello. Do u solve this problem?

LWJerri avatar May 27 '22 18:05 LWJerri

the dirty way to solve that problem is by using ts-ignore to ignore the const files = req.raw.files line

I couldn't find a proper way to solve it yet

ridhof avatar Jul 12 '22 08:07 ridhof

Same problem here.

gurumaxi avatar Jul 22 '22 17:07 gurumaxi

try to add this in code

declare module 'http' {
  interface IncomingMessage {
    files: {
      [key: string]: {
        name: string;
        data: Buffer;
        size: number;
        encoding: string;
        tempFilePath: string;
        truncated: boolean;
        mimetype: string;
        md5: string;
        mv: () => void;
      };
    };
  }
}

andaman-nr avatar Nov 02 '23 03:11 andaman-nr