# Bug OP-9230 - Cannot upload files with less common extensions (content type missing)

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-9230

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 11.4.1 |
| Observed in versions |  |
| Sprint | 11.4.1 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### **Environment**:

Your OpenProject Version: 11.4.0

<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/22562/content"></div></figure>

### **Steps to reproduce:**

1.  Setup S3 attachments and enable direct uploads
2.  Go to a work package
3.  Try to upload, say, as CSV file.

### **Actual Behavior**

The file upload fails with the error message "Content type cannot be blank".

### **Expected Behavior**

The file should be uploaded.

**Notes**

The content type seems to be empty for all files that aren't .txt, .jpg etc.. See marked area in screenshot. This only happens when using direct uploads the prepare endpoint for which expects the content type. The prepare endpoint should determine the correct content automatically if not given.
