Skip to content

Allow fetching of extraMetadata #1323

@timwsuqld

Description

@timwsuqld

Feature Request

Q A
New Feature yes
BC Break yes

Scenario / Use-case

Many backends provide more metadata. We currently populate FileAttributes with the data, but don't provide a way to access it. While we can't provide interfaces into any of that data in a way that would allow cross adapter use, we can just provide that data. That way when using the Flysystem, if you either know the specific filesystem adapter that will be used, or can use the metadata with a fallback, you can make for a more efficient system. For example, a few systems return the md5sum in the metadata, this can be used to check if a file matches an existing file before updating the file. It's easy enough to check the returned metadata for that field, and if not present, then code a fallback method (it may be more costly to replace the file if it hasn't changed).

I believe this would be a BC due to the addition of methods to the interfaces.

Summary

Expose the extraMetadata attribute to the end user.

Activity

linked a pull request that will close this issue on Jun 22, 2021
stale

stale commented on Mar 2, 2022

@stale

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

PaolaRuby

PaolaRuby commented on Mar 2, 2022

@PaolaRuby
Contributor

this would have been nice in v3

neffets

neffets commented on Apr 25, 2022

@neffets

I have use of this feature too.
I want provide further meta-data for attribution and licenses in the extraMetadata

marden

marden commented on Jan 23, 2023

@marden

It's definitely a high-value feature, especially for S3 as it holds a lot of useful metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @neffets@marden@timwsuqld@PaolaRuby

      Issue actions

        Allow fetching of extraMetadata · Issue #1323 · thephpleague/flysystem