diff --git a/README.md b/README.md index dd0d6b0..f7caa3c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/vormkracht10/flysystem-uploadcare/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/vormkracht10/flysystem-uploadcare/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) [![Total Downloads](https://img.shields.io/packagist/dt/vormkracht10/flysystem-uploadcare.svg?style=flat-square)](https://packagist.org/packages/vormkracht10/flysystem-uploadcare) -Flysystem adapter for Uploadcare with support for Laravel v10+. +Flysystem adapter for Uploadcare with support for Laravel v9+. ## Installation @@ -48,26 +48,31 @@ $uuid = Storage::disk('uploadcare')->putFileAsGetUuid('files', new File('/var/ww ``` **Get the content of a file** + ```php $contents = Storage::disk('uploadcare')->get(''); ``` **Deleting a file:** + ```php Storage::disk('uploadcare')->delete(''); ``` **Getting the mimetype of a file** + ```php $mimeType = Storage::disk('uploadcare')->mimeType(''); ``` **Get the filesize of a file** + ```php $bytes = Storage::disk('uploadcare')->filesize(''); ``` **Get the original filename** + ```php $info = Storage::disk('uploadcare')->fileInfo($result[0]); $filename = $info->extraMetadata()['originalFilename']; @@ -77,6 +82,7 @@ $filename = $info->extraMetadata()['originalFilename']; Directories in uploadcare are stored with an "~"-sign at the end of a uuid. Getting files from a directory could be retreived as follow: + ```php $files = Storage::disk('uploadcare')->files('0123a456-a0bc-0a1b-0ab1-0a1234a5b6c7~'); foreach ($files as $uuid) { @@ -107,9 +113,9 @@ Please review [our security policy](../../security/policy) on how to report secu ## Credits -- [Vormkracht10](https://github.com/vormkracht10) -- [Mathieu](https://github.com/casmo) -- [All Contributors](../../contributors) +- [Vormkracht10](https://github.com/vormkracht10) +- [Mathieu](https://github.com/casmo) +- [All Contributors](../../contributors) ## License