Skip to content

Implement Micronaut's ResourceLoader to be able to get objects using a short URI format #112

@alvarosanchez

Description

@alvarosanchez

Implement the ResourceLoader interface to get the objects using shorter URI in common format.


<object-storage-name>://path/to/file
  • is the ObjectStorage#getName

Then for configuration:

micronaut:
  object-storage:
    aws:
      public-images:
        bucket: public-images-bucket

The locator would be: public-images://path/to/file


[s3|os|gs|azb]:([cloud-provider-specifics]:)*//<storage-name>/path/to/file

Where for the cloud providers:

  • AWS
    • format: s3://<bucket-name>/path/to/file
    • example: s3://micronaut-object-storage/micronaut-buffer-netty-3.1.1.pom
  • Azure
    • format: azb:<storage-account-name>://<container>/path/to/file
    • example: azb:micronautpgressatest://micronaut-object-storate/micronaut-buffer-netty-3.1.1.pom
  • Google Cloud
    • format: gs://<bucket-name>/path/to/file
    • example: sgs//micronaut-object-storage/micronaut-buffer-netty-3.1.1.pom
  • Oracle Cloud
    • format: os:<region>:<namespace>://<bucket-name>/path/to/file
    • example: os:us-ashburn-1:cloudnative-devrel://micronaut-object-storate/micronaut-buffer-netty-3.1.1.pom

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions