title: React Native - Sending FormDate to C# API
body: <p>I am trying to send two pieces of information from my React Native app to my C# API.</p>
  <p>I just need to send a UserId along with a picture. If I use form-data on PostMan the information is reaching the API successfully and everything is working perfectly. Sending the data via React Native is where I am running into problems.</p>
  <p>It is not getting the user ID. I am sending a value of 2 but by the time I get it on the API it is 0.</p>
  <p>React native code (snippet):
  (Api is an instance of Axios)</p>
  <pre><code>        Api.defaults.headers.common['Content-Type'] = 'multipart/form-data'
  
          var name = userId + '.jpg'
          let formData = new FormData()
  
          formData.append('userId', userId)
          formData.append('profilePicture', {
              uri:
                  Platform.OS === 'android'
                      ? profilePicture.uri
                      : profilePicture.uri.replace('file://', ''),
              name: name,
              type: 'image/jpg',
          })
  
          const response = await Api.patch('/User/SaveProfilePictureUri', {
              formData,
          })
  </code></pre>
  <p>C# code (snippet):</p>
  <pre><code>        [HttpPatch]
          [Route(&quot;SaveProfilePictureUri&quot;)]
          public async Task&lt;bool&gt; SaveProfilePictureUri([FromForm(Name = &quot;userId&quot;)] int userId, [FromForm(Name = &quot;profilePicture&quot;)] IFormFile profilePicture)
          {
              Request.Headers.TryGetValue(&quot;Requestor&quot;, out var requester);
              _securityService.ValidRequester(requester);
              Request.Headers.TryGetValue(&quot;JwtToken&quot;, out var jwtToken);
              _securityService.CheckAuthentication(userId, jwtToken);
  
              return await _userService.SaveProfilePictureUri(userId, profilePicture);
          }
  </code></pre>
  <p>What other things can I try?</p>