Content-Length: 256547 | pFad | http://github.com/Superbalist/laravel-google-cloud-storage/pull/83

96 Add support for the 'metadata' config option by diezit · Pull Request #83 · Superbalist/laravel-google-cloud-storage · GitHub
Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Add support for the 'metadata' config option #83

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

diezit
Copy link

@diezit diezit commented Feb 19, 2020

Support for this was added in the main package Superbalist/flysystem-google-cloud-storage, but was not added to this laravel integration yet. This PR fixes that.

The commit that added metadata support to the other repo is Superbalist/flysystem-google-cloud-storage@fedbdca

@felipemeddeiros
Copy link

Could you help me in how to implente a metadata configuration?

@ffflabs
Copy link

ffflabs commented Oct 6, 2020

@felipemeddeiros you can do that already, for example:

     $disk = Storage::disk('gcs');
     $disk->put($filePath, $fileContents, [
            'metadata'=>[
                'cacheControl'=> 'public,max-age=86400',
                'contentType'=> 'image/jpeg'
            ]
     ]);

This PR would allow for a default metadata config applied to every upload which doesn't set an explicit config parameter

'gcs' => [
    'driver' => 'gcs',
    'project_id' => env('GOOGLE_CLOUD_PROJECT_ID', 'your-project-id'),
    ... other keys ...
     'metadata'=>[
           'cacheControl'=> 'public,max-age=86400',
     ]
]

usual metadata entries are described here: https://firebase.google.com/docs/storage/web/file-metadata

Added support for laravel 7.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Superbalist/laravel-google-cloud-storage/pull/83

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy