<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ali-Waseer</title>
    <description>The latest articles on DEV Community by Ali-Waseer (@aliwaseer).</description>
    <link>https://dev.to/aliwaseer</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F973452%2F2f84f99e-579e-44d1-bb0e-edf7611fef73.png</url>
      <title>DEV Community: Ali-Waseer</title>
      <link>https://dev.to/aliwaseer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aliwaseer"/>
    <language>en</language>
    <item>
      <title>How can I change file Key whie sbmiting form data to server</title>
      <dc:creator>Ali-Waseer</dc:creator>
      <pubDate>Wed, 16 Nov 2022 08:15:43 +0000</pubDate>
      <link>https://dev.to/aliwaseer/how-can-i-change-file-key-whie-sbmiting-form-data-to-server-2fdl</link>
      <guid>https://dev.to/aliwaseer/how-can-i-change-file-key-whie-sbmiting-form-data-to-server-2fdl</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;formData.append("uploaded_file_name", value.Upload_Files[0].fileDoc)

the payload like this: name="uploaded_file_name"; filename="AccouApi.pdf" Content-Type: application/pdf

I want like this: name="uploaded_file_name"; uploaded_file_name="AccouApi.pdf" Content-Type: application/pdf

I want repace "filename" with "uploaded_file_name"

                      &amp;lt;input
                              ref={fileInput}
                             //name="uploaded_file_name"
                              type="file"
                              style={{
                                display: "none",
                              }}
                              onChange={(event) =&amp;gt; {
                                setFieldValue(
                                  "fileDoc",
                                  event.target.files[0]
                                );
                              }}
                            /&amp;gt;
                            &amp;lt;button
                              className={classes.uploadFileBtn}
                              type="button"
                              onClick={() =&amp;gt; fileInput?.current?.click()}
                            &amp;gt;
                              &amp;lt;AddIcon
                                style={{
                                  marginRight: "10px",
                                }}
                              /&amp;gt;
                              Upload Document
                            &amp;lt;/button&amp;gt;
                            &amp;lt;small className={classes.uploadFileText}&amp;gt;
                              {values?.Upload_Files
                                ? values?.Upload_Files[0]?.fileDoc?.name ||
                                  values?.Upload_Files[0]?.uploadDoc?.split("/").pop()
                                :  "No file chosen"}
                            &amp;lt;/small&amp;gt;
                            &amp;lt;small className={classes.uploadFileRemovet} onClick={()=&amp;gt;{setFieldValue(
                                  "fileDoc",
                                  ""
                                )}}&amp;gt;
                            &amp;lt;span style={{color: "red"}}&amp;gt; Remove&amp;lt;/span&amp;gt;
                            &amp;lt;/small&amp;gt;
                          &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>react</category>
      <category>api</category>
    </item>
  </channel>
</rss>
