title: Alfresco:: How to add custom properties during file upload using REST api
body: <p>While uploading a file, I am using the below API.</p>
  
  <pre><code>http://localhost:8080/alfresco/service/api/upload 
  </code></pre>
  
  <p>File is getting uploaded successfully in alfresco repository. 
  Now my requirement is, If I want to add custom properties like 
  <strong>custom1, custom2, custom3, custom4</strong> etc
  Could you please give us a solution using browser API/AJAX call.</p>
  
  <p>Below is my code</p>
  
  <pre><code>&lt;form method="post" name="uploadForm" enctype='multipart/form-data' id="upload_form" action="http://localhost:8080/alfresco/service/api/upload"&gt;
     &lt;input type="hidden" name="destination" id="destination" value="workspace://SpacesStore/3f132339-bac1-4e0c-be03-b2ec5dbea61b" /&gt;
     &lt;input type="hidden" name="overwrite" id="overwrite" value="false" /&gt;   
     &lt;br /&gt;
     &lt;label&gt;custom1:&lt;/label&gt;
     &lt;br /&gt;
     &lt;input type="text" name="custom1" id="custom1" /&gt;
     &lt;br /&gt;
     &lt;label&gt;custom2:&lt;/label&gt;
     &lt;br /&gt;
     &lt;input type="text" name="custom2" id="custom2" /&gt;
     &lt;br /&gt;
     &lt;label&gt;custom3:&lt;/label&gt;
     &lt;br /&gt;
     &lt;input type="text" name="custom3" id="custom3" /&gt;
     &lt;br /&gt;           
     &lt;label&gt;custom4:&lt;/label&gt;
     &lt;br /&gt;
     &lt;input type="text" name="custom4" id="custom4" /&gt;
         &lt;br /&gt;
         &lt;br /&gt;
     &lt;label&gt;File:&lt;/label&gt;
     &lt;br /&gt;
     &lt;input class="button" type="file" name="filedata" id="filedata" /&gt;
     &lt;br /&gt;
     &lt;input class="button" type="submit" name="submit" value="Upload" /&gt;
  &lt;/form&gt;
  </code></pre>