title: Magento 1.9.1.0 - Upload PDF File Type in Wysiwyg Editor and show PDF Icon
body: <p>I made a custom module allowing user to upload <code>.PDF</code> file type in <code>CMS &gt; Pages</code>. The code used is below:</p>
  
  <p><strong>app/etc/modules</strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;config&gt;
    &lt;modules&gt;
      &lt;Pdf_WysiwygFiles&gt;
        &lt;active&gt;true&lt;/active&gt;
        &lt;codePool&gt;local&lt;/codePool&gt;
      &lt;/Pdf_WysiwygFiles&gt;
    &lt;/modules&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p><strong>app/code/local/Pdf/WysiwygFiles/etc/config.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;config&gt;
    &lt;modules&gt;
      &lt;Pdf_WysiwygFiles&gt;
        &lt;version&gt;1.0.0&lt;/version&gt;
      &lt;/Pdf_WysiwygFiles&gt;
    &lt;/modules&gt;
    &lt;adminhtml&gt;
      &lt;cms&gt;
        &lt;browser&gt;
          &lt;extensions&gt;
            &lt;allowed&gt;
              &lt;jpg&gt;1&lt;/jpg&gt;
              &lt;jpeg&gt;1&lt;/jpeg&gt;
              &lt;png&gt;1&lt;/png&gt;
              &lt;gif&gt;1&lt;/gif&gt;
              &lt;pdf&gt;1&lt;/pdf&gt;
            &lt;/allowed&gt;
          &lt;/extensions&gt;
        &lt;/browser&gt;
      &lt;/cms&gt;
    &lt;/adminhtml&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>This works in <code>CE-1.9</code> and does allow to upload PDF file when you click on <strong>Insert Image</strong> button and does not allow to <code>link</code> it. </p>
  
  <p>Also, how to add a <code>pdf preview icon</code> for each file uploaded ? The result would be like below image</p>
  
  <p><img src="https://i.stack.imgur.com/OEiU9.png" alt="enter image description here"></p>