title: Opencart - Upload Specific File Type
body: <p>I am using OpenCart 1.5.6 and have two options for the customer to upload files to a product (image and video). When the users clicks upload I would like them to only be able to select specific file types from their computer while they browse for the files. So instead of "All Files" in the browser window, I want it to only allow .png, .jpg, .jpeg, .pdf, etc. for the image upload and for the video file I just want it to look for .mp4, .mov, .flv.</p>
  
  <p>Here is an example: <a href="http://jsfiddle.net/VCdvA/" rel="nofollow noreferrer">http://jsfiddle.net/VCdvA/</a></p>
  
  <p>I have tried to use the accept attribute <a href="https://stackoverflow.com/questions/181214/file-input-accept-attribute-is-it-useful">according to this post</a> but it doesn't work.</p>
  
  <p>Here is my code for the product.tpl:</p>
  
  <pre><code>  &lt;input type="button" accept="video/*,image/*" value="&lt;?php echo $button_upload; ?&gt;" id="button-option-&lt;?php echo $option['product_option_id']; ?&gt;" class="button" &gt;
    &lt;input type="hidden" name="option[&lt;?php echo $option['product_option_id']; ?&gt;]" value="" /&gt;
  </code></pre>
  
  <p>I think that the problem is that it is type="button" and not type="file". Is there another way to limit the upload file type within the OpenCart product page?</p>