Can not store Attechments to S3
Asked by Sven Finsterwalder:

Our Jira DC (9.12.x) is running on OpenShift.

We use the filestore-config.xml to setup our own S3 Bucket.

![filestore-config.png](https://community.atlassian.com/t5/image/serverpage/image-id/332337iB1D8F2FCFAA85276/image-size/large?v=v2&px=999 "filestore-config.png")

The feature flag was enabled correctly as per [these](https://confluence.atlassian.com/jirakb/how-to-manage-dark-features-in-jira-959286331.html) instructions.

We have start the pod and in the jira-log we can read this:  

```
"logger":"com.atlassian.jira.filestore.FileStoreSwitcher",
"message":"Due to the feature com.atlassian.jira.attachments.storage.configurable being disabled, the attachments storage is not configurable. Defaulting to attachments stored in the Jira home"

```

But for avatars ist works and they are stored in our S3 Bucket

What we are missing? Or is it not support on Jira?

if i call GET on the "DarkFeature" [\<baseURL\>/rest/internal/1.0/darkFeatures/com.atlassian.jira.attachments.storage.configurable](https://jira-dev.apps.ocpdev.mauintra.de/rest/internal/1.0/darkFeatures/com.atlassian.jira.attachments.storage.configurable)

It returns "{"enabled": true}" so why the FileStoreSwitcher says it it disabled?


Answers:
author: Sven Finsterwalder
body: We found the "problem" ... it was the way how we enable the "DarkFeature"

On that page [How to manage dark features in Jira \| Jira \| Atlassian Documentation](https://confluence.atlassian.com/jirakb/how-to-manage-dark-features-in-jira-959286331.html) the sentence
> In order to enable a feature flag, type *\<feature_flag_name\>.enabled* in the **Enable dark feature** text area and click the **Add** button.

does not work with that DarkFeature.

We only have to add "*com.atlassian.jira.attachments.storage.configurable* " ++without++ the "*.enabled*" at the end and now it works as expected.

We can upload Attachment and they will be saved at the S3 Bucket.

Unfortunately, the corresponding rest call now shows "false". [\<baseURL\>/rest/internal/1.0/darkFeatures/com.atlassian.jira.attachments.storage.configurable](https://jira-dev.apps.ocpdev.mauintra.de/rest/internal/1.0/darkFeatures/com.atlassian.jira.attachments.storage.configurable) BUT it works.


author: Yevhen
body: [@Sven Finsterwalder](/t5/user/viewprofilepage/user-id/5370244) you need to enable this dark feature. See the warning block in <https://confluence.atlassian.com/adminjiraserver0912/storing-attachments-in-amazon-s3-1346048178.html>

comments: author: Sven Finsterwalder
body: Thank you, but as I wrote above "The feature flag was enabled correctly as per [these](https://confluence.atlassian.com/jirakb/how-to-manage-dark-features-in-jira-959286331.html) instructions." It is enabled.

![jira-darkfeature.png](https://community.atlassian.com/t5/image/serverpage/image-id/332673iC8EBB1D7CE47407E/image-size/large?v=v2&px=999 "jira-darkfeature.png")

And I have also restart the pod, but the flag seems to be ignored.


author: Yevhen
body: Sorry, I missed it completely that you did enabled this feature. It should be supported for this Jira version as far I know, but I am not a Jira SME.


author: Sven Finsterwalder
body: no problem.

On that page [Configuring file attachments \| Administering Jira applications Data Center 9.12 \| Atlassian Documentation](https://confluence.atlassian.com/adminjiraserver0912/configuring-file-attachments-1346048156.html)

there is one sentense:
> "This feature isn't supported for on-premise deployments or for any customers not running Jira in AWS."

So did we need a real AWS Bucket?

I wish I could take a look in the FileStoreSwitcher class ...


author: Yevhen
body: I think you need to configure 2 separate s3-filestore ids - for avatars and attachments, and pre-create AWS S3 buckets for each of those.


author: Sven Finsterwalder
body: For now I have disabled the entry for avatars and deploy it again, restart the pod and it does not work.

The "FileStoreSwitcher" says again "Due to the feature com.atlassian.jira.attachments.storage.configurable being disabled, the attachments storage is not configurable..."


author: Yevhen
body: But you did specify bucket name and region?


author: Sven Finsterwalder
body: yes sure, in my sceenshot above i made it invisible.  

if i call GET on the "DarkFeature" [\<baseURL\>/rest/internal/1.0/darkFeatures/com.atlassian.jira.attachments.storage.configurable](https://jira-dev.apps.ocpdev.mauintra.de/rest/internal/1.0/darkFeatures/com.atlassian.jira.attachments.storage.configurable)

It returns "{"enabled": true}" so why the FileStoreSwitcher says it it disabled?


Tags: attachment

bucket

data-center

jira-data-center

jira-server

s3

server