# Bug OP-15709 - [API] File link creation does not work for legacy nextcloud storage data

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 14.4.1 |
| Observed in versions | 14.4.0 |
| Sprint | 14.4.1 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 14.4.x |
| 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 | Eric Schubert |
| Product manager |  |
| Developers | OP Dev Titan Team |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  enforce a nextcloud storage to be configured with a URL without a trailing slash (database manipulation needed)

2.  Try to create a file link via API (using `POST /api/v3/files_links` or `POST /api/v3/work_packages/:id/file_links`) or by using the nextcloud integration app.

### What is the buggy behavior?

  - File link creation fails with "storage not existent"

### What is the expected behavior?

1.  File link creation works

### Important note

Eventually this won't happen anymore, as new or edited nextcloud storages always have a canonical url stored in the database with a trailing slash. But the application must be compatible to the legacy data.
