# Bug OP-18827 - PIR artifact is uploaded twice if attachments are selected as artifact storage method

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Project creation, Modules and project features / File storages |
| Target versions | 17.1.0 |
| Observed in versions | 17.0.0 |
| Sprint | 17.1.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 17.0.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 |  |
| Product manager |  |
| Developers | Oliver Günther |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### 

this was found by Maya :) 

### Steps to reproduce

1.  Create a PIR template

2.  Select attachments as artifact storage method

3.  Submit a PIR with that template

### What is the buggy behaviour?

  - PDF is uploaded twice on the PIR WP

  - One is uploaded by 'Admin' and the other one by the actual user who submitted

### What is the expected behaviour?

1.  Only 1 PDF is uploaded

### Important note

This works as expected when using a Nextcloud storage

### Screenshots and other files

with attachments as storage

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/918757/content">

with NC as storage

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/918758/content">

### Environment information

**OpenProject version**

Core build

[1b3d104516da9c3cea840e4e3407f6ab8a85eeef](https://qa.openproject-stage.com/external_redirect?url=https%3A%2F%2Fgithub.com%2Fopf%2Fopenproject%2Fcommits%2F1b3d104516da9c3cea840e4e3407f6ab8a85eeef)

Product version

[27e147555efcba1703d2db20bc42e71ed9200f02](https://qa.openproject-stage.com/external_redirect?url=https%3A%2F%2Fgithub.com%2Fopf%2Fsaas-openproject%2Fcommits%2F27e147555efcba1703d2db20bc42e71ed9200f02)

Core version

OpenProject 17.1.0

**Browser**

- [ ] Chrome
- [x] Firefox
- [ ] Safari
- [ ] Mobile Safari
- [ ] Other (please specify)

**Operating System**

- [x] Windows
- [ ] Mac OS X
- [ ] Mobile iOS
- [ ] Mobile Android
- [ ] Linux (please specify distro)
- [ ] Chrome OS
- [ ] Other (please specify)
