usebruno / bruno-docs

Documentation Site for Bruno
https://bruno-docs.vercel.app
MIT License
18 stars 65 forks source link

Feedback for “Bru Tag Reference” #94

Closed manuelbamise closed 3 months ago

manuelbamise commented 3 months ago

Sending a file through the multipart Form

there's a problem with this feature, it doesn't pass the file through to the api

I have this project i was working on

    @UploadedFile() file: Express.Multer.File,
    // @Res() res: Response,
  ) {
    try {
      if (file) {
        console.log(file);
      } else {
        console.log('Error uploading file');
        console.log(file);

        // throw new Error("File didn't get uploaded");
      }
    } catch (error) {
      console.log(error);

      //   res.status(400).send({ error: error.message });
    }
  }

using nestjs, i tried to send a file using the multipart form, it was just giving errors.

manuelbamise commented 3 months ago

i found out how to fix it, i just set the key name to the value in FileInceptor(name)