title: How to send file buffered data from one serve to another server
body: <p>I have files data in the following format which is received from client, i need to send these details into another server but the file is not reaching to another end</p>
  <pre><code>{
    fieldname: 'clientmanagedFacilityfile',
    originalname: 'Test Word.docx',
    encoding: '7bit',
    mimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
    buffer: &lt;Buffer 50 4b 03 04 14 00 06 00 08 00 00 00 21 00 df a4 d2 6c 5a 01 00 00 20 05 00 00 13 00 08 02 5b 43 6f 6e 74 65 6e 74 5f 54 79 70 65 73 5d 2e 78 6d 6c 20 ... 11781 more bytes&gt;,
    size: 11831
  } 
  </code></pre>
  <p>I'm using NestJS to send the buffer data, this my implementation. Please verify and help me</p>
  <pre><code>async uploadFiletoIC(files, bodyData: {ticketID: string, employeeID: string} , headers: Headers): Promise&lt;any&gt; {
           console.log('FILES........',files);
          const formData = new FormData(); 
          formData.append(files.fieldname, files.buffer, files.originalname);
          formData.append('ticketID', bodyData.ticketID);
          formData.append('employeeID', bodyData.employeeID);
      
          const request_config = {
              headers: {
              }
          };
          request_config.headers['Authorization'] = headers['authorization'];
          request_config.headers['trace-id'] = headers['trace-id'];
          request_config.headers['uuid'] = headers['uuid'];
          request_config.headers['source-id'] = headers['source-id'];
          request_config.headers['Content-Length'] = headers['content-length'];
          request_config.headers['Accept-Encoding'] = headers['accept-encoding'];
          request_config.headers['Content-Type'] = headers['content-type'];
          request_config.headers['accept'] = '*/*'
  
          const baseApiUrl = 'https://myurl';
          console.log(request_config);
          const response = await this.httpService.post(baseApiUrl,formData, request_config).toPromise();
          console.log(response.data, 'RESPONSE');
          return Promise.resolve(response.data);
      }  
  </code></pre>
  <p>Do I need to convert buffer into any other another format?</p>
  <hr />
  <p>I created sample Nodejs serve and try to print the file, but it not present on the <code>req</code>
  mock server</p>
  <pre><code>router.post('/api/file/upload',upload.single('clientmanagedFacilityfile'), function (req, res, next){ 
      console.log(req.file, 'FILESSS*********');
      console.log(req.body, 'REQ BODY######');
      console.log(req, 'REQ');
      return 'success';
  })
  </code></pre>
  <p>If I call the mock server from postman the files are reaching properly</p>
  <p>Html Angular ts</p>
  <pre><code> if(this.formService.model['uploadChecklist']) {
              let file = this.formService.model['uploadChecklist'] as File;
              fData.append('clientmanagedFacilityfile',file, file.name);
            }
  -----
  this.gbtService.uploadIC(fData).subscribe((data)=&gt;{console.log(data)})
  </code></pre>
  <hr />
  <p>Angular service</p>
  <pre><code>uploadIC(fData):Observable&lt;any&gt; {
          return this.http.post('/api/file/upload/icgbt',fData);
      }
  </code></pre>