# Can't upload ovpn file

**URL:** <https://forums.rocket.chat/t/cant-upload-ovpn-file/19455>\
**Category:** Community Support\
**Created:** [February 12, 2024, 7:51pm UTC](https://forums.rocket.chat/t/cant-upload-ovpn-file/19455 "2024-02-12T19:51:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![emoxam](https://avatars.discourse-cdn.com/v4/letter/e/8baadc/32.png) [@emoxam](https://forums.rocket.chat/u/emoxam)\
**Post date:** [February 12, 2024, 7:51pm UTC](https://forums.rocket.chat/t/cant-upload-ovpn-file/19455/1 "2024-02-12T19:51:20Z")

</div>

### Description

Can’t send ovpn file  
“media types not accepted”

### Server Setup Information

- Version of Rocket.Chat Server: installed: 6.6.0 (1602) 361MB -
- Operating System: ubuntu
- Deployment Method: snap
- Number of Running Instances:
- DB Replicaset Oplog:
- NodeJS Version:
- MongoDB Version:
- Proxy: nginx
- Firewalls involved:

- Desktop App or Browser Version: 3.9.12
- Operating System: Windows

---

<div class="post-metadata">

**Author:** ![DustpaN](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@DustpaN](https://forums.rocket.chat/u/DustpaN)\
**Post date:** [February 19, 2024, 7:46am UTC](https://forums.rocket.chat/t/cant-upload-ovpn-file/19455/2 "2024-02-19T07:46:58Z")

</div>

Rocket.Chat Server: 6.6.0  
Same issue

---

<div class="post-metadata">

**Author:** ![DustpaN](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@DustpaN](https://forums.rocket.chat/u/DustpaN)\
**Post date:** [March 12, 2024, 10:05am UTC](https://forums.rocket.chat/t/cant-upload-ovpn-file/19455/3 "2024-03-12T10:05:44Z")

</div>

Problem in this commit

> <https://github.com/RocketChat/Rocket.Chat/pull/31346/files>
>
> Proposed changes (including videos or screenshots)
> 
> BEFORE THE FIX
> https://gi…thub.com/RocketChat/Rocket.Chat/assets/112304873/68e9d8d0-3ef5-411a-93e5-d009ff97c331
> 
> AFTER THE FIX
> https://github.com/RocketChat/Rocket.Chat/assets/112304873/73c161a2-3658-4b76-8276-e38dbfc6f177
> 
> 
> 
> REASON BEHIND CHANGES
> If the type of file which we want to upload is not clear then we should not allow it to be uploaded in the server
> 
> Issue(s)
> This should close issues :-
> closes https://github.com/RocketChat/Rocket.Chat/issues/27924
> 
> Steps to test or reproduce
> 
> 1. Login to rocket chat.
> 2. Set "Accepted Media Types" setting in "File Upload" section. For example image/\*,application/pdf,text/plain,application/msword
> 3. Try sending a rare file type like .har
> 4. The file is not loaded into the chat, and there is no error message.

Was: invalidContentType: Boolean(file.type && !fileUploadIsValidContentType(file.type)),  
Now: invalidContentType: !(file.type && fileUploadIsValidContentType(file.type)),  
If we can’t detrminate a MIME type of a file (file.type) it will return a false and all not recognised types will be not work at all even if “Accepted Media Types” is empty.

---

<div class="post-metadata">

**Author:** ![hugocosta](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/hugocosta/32/4753_2.png) [@hugocosta](https://forums.rocket.chat/u/hugocosta)\
**Post date:** [May 23, 2024, 1:46pm UTC](https://forums.rocket.chat/t/cant-upload-ovpn-file/19455/4 "2024-05-23T13:46:03Z")

</div>

The fix it’s in this PR: [fix: Accepted Media Types settings validation](https://github.com/RocketChat/Rocket.Chat/pull/32478)
