Skip to content

How to set s3ForcePathStyle in apostrophe-attachments/uploadfs for Minio #61

@viewdeckcloud

Description

@viewdeckcloud

Hi, this is probably a newbie question, but Im struggling to see how to set the
s3ForcePathStyle option in s3.js / uploadfs to get apostrophe-attachments to use {endpoint}/{bucket} format rather than {bucket}.{endpoint} format. ( needed for Minio and Wasabi it seems )

( Following the handy guide in https://wasabi-support.zendesk.com/hc/en-us/articles/360004346871-How-do-I-use-Apostrophe-CMS-with-Wasabi- ) I tried :-

in app.js

    'apostrophe-attachments': {
      uploadfs: {
        s3ForcePathStyle: true
      }
    },

Ive also tried the "style" = "path" option , but that doesnt seem to filter down either.

Ive tried the suggestions in https://javascriptio.com/view/2800082/serving-apostrophe-cms-s3-assets-attachments-as-https version, which has the setup in..../lib/modules/apostrophe-attachments/index.js

// in ./lib/modules/apostrophe-attachments/index.js

module.exports = {
  uploadfs: {
        s3ForcePathStyle: true
  }
}

But alas, none of these have the desired outcome..
Possibly missing something very obvious, but any pointers greatly appreciated...
``

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions