# No button to reset an INPUT FILE field

**URL:** <https://discourse.mozilla.org/t/no-button-to-reset-an-input-file-field/35111>\
**Category:** Developer Tools\
**Created:** [January 15, 2019, 11:20am UTC](https://discourse.mozilla.org/t/no-button-to-reset-an-input-file-field/35111 "2019-01-15T11:20:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![niente0](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/niente0/32/25747_2.png) [@niente0](https://discourse.mozilla.org/u/niente0)\
**Post date:** [January 15, 2019, 11:20am UTC](https://discourse.mozilla.org/t/no-button-to-reset-an-input-file-field/35111/1 "2019-01-15T11:20:05Z")

</div>

Hi all, I’d like to have an option in devtool to be able to reset an input type=file field (for debugging purposes). I don’t know if it already exists, if yes it’s well hidden.  
Thank you

---

<div class="post-metadata">

**Author:** ![Nicolas\_Chevobbe](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/nicolas_chevobbe/32/28203_2.png) [@Nicolas\_Chevobbe](https://discourse.mozilla.org/u/Nicolas_Chevobbe)\
**Post date:** [January 15, 2019, 11:28am UTC](https://discourse.mozilla.org/t/no-button-to-reset-an-input-file-field/35111/2 "2019-01-15T11:28:31Z")

</div>

I don’t think there’s such thing indeed.  
What you can do though is set the value from the console:

```auto
document.querySelector("input[type=file]").value = ""

```

if you have the element selected in the inspector, you can also do:

```auto
$0.value = ""

```

---

<div class="post-metadata">

**Author:** ![niente0](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/niente0/32/25747_2.png) [@niente0](https://discourse.mozilla.org/u/niente0)\
**Post date:** [January 15, 2019, 11:34am UTC](https://discourse.mozilla.org/t/no-button-to-reset-an-input-file-field/35111/3 "2019-01-15T11:34:28Z")

</div>

Thank you for your solution, it works great!!  
Anyway it would be nice to implement this reset feature in context menu or in another place in devtools to get faster access. 😀

---

<div class="post-metadata">

**Author:** ![ldetomi1](https://avatars.discourse-cdn.com/v4/letter/l/9e8a1a/32.png) [@ldetomi1](https://discourse.mozilla.org/u/ldetomi1)\
**Post date:** [January 29, 2019, 10:46am UTC](https://discourse.mozilla.org/t/no-button-to-reset-an-input-file-field/35111/4 "2019-01-29T10:46:25Z")

</div>

It could be a good idea for also other fields. Maybe a “reset” context menu entry on each field, reset it, and the same action on the form tag, will reset the entire content
