Content-Length: 213679 | pFad | http://github.com/Superbalist/laravel-google-cloud-storage/issues/67

33 Implement temporaryUrl method · Issue #67 · 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.

Implement temporaryUrl method #67

Open
fosron opened this issue Jul 16, 2019 · 0 comments
Open

Implement temporaryUrl method #67

fosron opened this issue Jul 16, 2019 · 0 comments

Comments

@fosron
Copy link

fosron commented Jul 16, 2019

It was mentioned previously (#35), but now the official adapters like S3 and Rackspace have the capabilities built-in as:

\Illuminate\Filesystem\FilesystemAdapter::temporaryUrl

public function temporaryUrl($path, $expiration, array $options = [])
    {
        $adapter = $this->driver->getAdapter();

        if ($adapter instanceof CachedAdapter) {
            $adapter = $adapter->getAdapter();
        }

        if (method_exists($adapter, 'getTemporaryUrl')) {
            return $adapter->getTemporaryUrl($path, $expiration, $options);
        } elseif ($adapter instanceof AwsS3Adapter) {
            return $this->getAwsTemporaryUrl($adapter, $path, $expiration, $options);
        } elseif ($adapter instanceof RackspaceAdapter) {
            return $this->getRackspaceTemporaryUrl($adapter, $path, $expiration, $options);
        } else {
            throw new RuntimeException('This driver does not support creating temporary URLs.');
        }
    }

It should be possible to implement this in the adapter for GCS.

fosron added a commit to fosron/laravel-google-cloud-storage that referenced this issue Oct 14, 2019
Superbalist#67 this is already available from Flysystem package.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 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/issues/67

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy