matthewbdaly/laravel-azure-storage

prefix not working as properly on laravel 9x and 10x

Closed this issue · 2 comments

Please ensure you complete this checklist in full. If you fail to do so, you're wasting my time and I will reserve to right to close the issue without looking

Checklist

This package is just a wrapper for Flysystem's Azure storage backend to integrate it with Laravel's storage API. As such, many problems users may experience with it may actually be issues with Flysystem, the Azure driver for Flysystem, or Microsoft's PHP SDK. To help eliminate these issues, please confirm the following:

  • I'm able to instantiate a Flysystem instance using the same credentials as passed to this package.
  • The Flysystem instance works as expected, and the bug I am reporting is not reproducible when interacting directly with Flysystem
  • I can instantiate the Microsoft Azure PHP SDK successfully and can interact with my file successfully using that

Describe the bug
When I add the prefix property and use the Storage::disk('azure')->url($filename) method
prefix in url is returned twice
prefix: my-prefix
filename: 'report.xlsx'
output: https://test.blob.core.windows.net/my-storage/my-prefix/my-prefix/report.xlsx

To Reproduce
Steps to reproduce the behavior:

  1. create a new project with laravel 10x
  2. install matthewbdaly/laravel-azure-storage
  3. put .env variables with azure storage credentials
  4. edit config/filesystems.php with env variables
  5. fill config/filesystems.php > disks -> azure -> prefix with my-prefix
  6. upload file and try get file url

Expected behavior
output: https://test.blob.core.windows.net/my-storage/my-prefix/report.xlsx

Packages and PHP version

  • PHP version 8.2
  • Laravel version 10x
  • Version of this package 2.0.8

Screenshots

image
image

Does the same thing happen if you instantiate the Flysystem instance with your credentials?

I note you didn't confirm that field and since this just a wrapper for the Flysystem driver, I need to confirm that before any other action.