# Issues uploading in custom wizard plugin

**URL:** <https://meta.discourse.org/t/issues-uploading-in-custom-wizard-plugin/96721>\
**Category:** Development\
**Created:** [September 8, 2018, 9:38am UTC](https://meta.discourse.org/t/issues-uploading-in-custom-wizard-plugin/96721 "2018-09-08T09:38:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)\
**Post date:** [September 8, 2018, 1:08pm UTC](https://meta.discourse.org/t/issues-uploading-in-custom-wizard-plugin/96721/2 "2018-09-08T13:08:48Z")

</div>

You’ll want to do 2 things here, which are independent of making changes to the custom-wizard plugin.

1 **Create a theme component** which overrides the wizard-field-image.hbs template in core (it’s not in the custom-wizard plugin) [Note that we’re doing this to change the ‘accept’ field in the input, unfortunately there’s not a less obstrusive way to do this at this time that I’m aware of]

```plaintext
<script type="text/x-handlebars" data-template-name="wizard/templates/components/wizard-field-image">
  {{#if field.value}}
    {{component previewComponent field=field fieldClass=fieldClass wizard=wizard}}
  {{/if}}

  <label class="wizard-btn wizard-btn-upload {{if uploading 'disabled'}}">
    {{#if uploading}}
      {{i18n "wizard.uploading"}}
    {{else}}
      {{i18n "wizard.upload"}}
      {{d-icon "picture-o"}}
    {{/if}}

    <!-- Note the addition of application/pdf here-->
    <input disabled={{uploading}} type="file" accept="image/*,application/pdf" style="visibility: hidden; position: absolute;" />
  </label>
</script

```

2 **Add ‘pdf’** to the list of authorized extensions in your settings

 ![](https://global.discourse-cdn.com/meta/original/3X/6/0/602ff51030a3d5fcefe03be5aca2ac65b02e748a.png)

Be aware that letting people you don’t trust upload pdfs [is a dangerous thing](https://security.stackexchange.com/questions/64052/can-a-pdf-file-contain-a-virus).

You might need some additional finagling to display an acceptable preview / placeholder image, since the uploader thing will try to display an image preview and that won’t work

 ![](https://global.discourse-cdn.com/meta/original/3X/f/8/f87f680bf261a29792eec613ed19dc000197b29a.png)

that’s out of scope of my free tier, though 😊

---

_[View the full topic](https://meta.discourse.org/t/issues-uploading-in-custom-wizard-plugin/96721)._
