title: How to call "gambar" to Data => image
body: <p>This is my code. How to make &quot;const gambar&quot; can called trough Data = {... images : };. I want to get my filename only, im already tried but it showed C:\fakepath as always. Maybe there one another step to make delete C:\fakepath and show original file name based on upload ?</p>
  
  <pre class="lang-js prettyprint-override"><code>const ContactAreaTwo = (event) =&gt; {
  
      const uploadToClient = async (event) =&gt; {
        const gambar = event.target.files[0].name
      }
  
      const handleSubmit = async (event) =&gt; {
        // Stop the form from submitting and refreshing the page.
        event.preventDefault()
  
        // Get data from the form.
          const data = {
          company_name: event.target.company_name.value,
          name: event.target.name.value,
          city: event.target.city.value,
          country: event.target.country.value,
          phone: event.target.phone.value,
          email: event.target.email.value,
          message: event.target.message.value,
          product: event.target.product.value,
          image : &lt;uploadToClient/&gt;,
      }
      }
  </code></pre>