Comments (2)
It's possible to get the file fairly easily from Azure using the config details. Before I created this package I used Graham Campbell's Flysystem package for storing documents on Azure and I had to construct the URL as follows:
$url = 'https://' . config('filesystems.disks.azure.name'). '.blob.core.windows.net/' . config('filesystems.disks.azure.container') . '/' . $filename;
While I haven't used Azure for a while, this should still work unless the naming scheme has drastically changed in the meantime. I will add this to the README for future reference. It'd probably be a good idea to create a reusable helper for your own use case.
It does look like actually getting Storage::get($path)
working with Azure isn't likely to be practical. If you look at the url($path)
method in https://github.com/laravel/framework/blob/c91c742eb1f6a0cefacde3a558566081f7738f2c/src/Illuminate/Filesystem/FilesystemAdapter.php which actually does the work, it explicitly specifies the adapters that have this functionality. Implementing support for this would therefore be a case of extending that class and adding support for it there, and amending how the framework resolves that particular interface. Extending core parts of the framework like that could be fairly dodgy, so I'm very reluctant to go down that road.
Put it this way, as far as I can see it would be easier to just add this functionality to Laravel itself, but considering the relatively small profile Azure has among Laravel developers compared to S3, I'd be surprised if Taylor Otwell wanted to add that functionality to the core framework. For one piece of functionality that can be duplicated by a simple helper function, it's probably not worth it.
from laravel-azure-storage.
Thanks @matthewbdaly that makes sense. So essentially just construct the url myself based on the expected
url from azure. I would image those don't change too often and are hopefully backward compatible. Would probably make sense to set up a subdomain anyway.
Thanks for the response!
from laravel-azure-storage.
Related Issues (20)
- Server failed to authenticate the request HOT 1
- SessionHandler HOT 1
- getTemporaryUrl does not consider the prefix HOT 5
- Support AAD authentication HOT 1
- New feature requesting for removed file from Azure Storage HOT 1
- Prefix for filesystem directory does not apply into Storage::url HOT 3
- How to use multiple azure storage? HOT 1
- Instantiate from Connection String HOT 4
- Calling exists on directory returns false HOT 4
- Error with installing the package HOT 1
- Error: This driver does not support creating temporary URLs. HOT 3
- Change in prefix causes incompatibility with HOT 4
- Dynamically change azure container for each request HOT 1
- Azure Storage == Sharepoint HOT 1
- KeyNotSet error when using connection_string HOT 2
- Invalid URL generation when using the `prefix` config HOT 2
- Setting CacheControl headers for uploaded files HOT 1
- Warning - this package will be deprecated on 17 March 2024 HOT 8
- prefix not working as properly on laravel 9x and 10x HOT 2
- Converting to request via API HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-azure-storage.