# Block certain file types from being uploaded to nuget repository

**URL:** <https://community.sonatype.com/t/block-certain-file-types-from-being-uploaded-to-nuget-repository/12447>\
**Category:** Sonatype Nexus Repository\
**Tags:** nexus-repository, component, policy\
**Created:** [April 19, 2024, 10:24am UTC](https://community.sonatype.com/t/block-certain-file-types-from-being-uploaded-to-nuget-repository/12447 "2024-04-19T10:24:46Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![sebastian.karlsson](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@sebastian.karlsson](https://community.sonatype.com/u/sebastian.karlsson)\
**Post date:** [April 19, 2024, 10:24am UTC](https://community.sonatype.com/t/block-certain-file-types-from-being-uploaded-to-nuget-repository/12447/1 "2024-04-19T10:24:46Z")

</div>

I have a Hosted Nuget Repository where I would like to include a rule that .nupkg packages containing a certain file extension are blocked from being uploaded to that repository. Is there any standard functionality for this? if not, is it possible to attach custom scripts to Nexus triggered on repository upload?

---

_[View the full topic](https://community.sonatype.com/t/block-certain-file-types-from-being-uploaded-to-nuget-repository/12447)._
