- How do I install and configure the Huawei Cloud OBS driver for Laravel?
- Install it with composer require dscmall/laravel-filesystem-obs, then add a disk entry in config/filesystems.php using the obs driver along with your access key, secret key, bucket, and region-specific endpoint. The package registers its service provider through Laravel package discovery, so manual registration is normally unnecessary. Confirm the supported Laravel version for your app before relying on it in production.
- Which Laravel and Flysystem versions does this OBS package support?
- The package is a Flysystem adapter for the Storage facade, so the critical compatibility point is Flysystem v3 on Laravel 9 and later versus the older AdapterInterface used in Laravel 8 and earlier. Because the repository is small and low-traffic, do not assume a CI matrix covers Laravel 9 through 12 or PHP 7.4 through 8.3. Check the composer.json constraints and run a quick spike on your exact version pair.
- Does laravel-filesystem-obs support temporaryUrl() for private buckets?
- Generating presigned URLs is essential for private OBS buckets, since exposing objects publicly is a security regression. OBS exposes S3-style signing, so a dedicated adapter can implement temporaryUrl(), but support must be verified in the source or by test because the Flysystem contract only defines the method, not the OBS signing details. If it is missing, you will need a workaround with the Huawei SDK or a public-bucket fallback you should avoid.
- Are large uploads and downloads streamed or buffered in memory by the OBS driver?
- This matters at scale: if the adapter reads an entire object into a string before returning it, large downloads will hit PHP's memory_limit under load. Flysystem's readStream() and writeStream() methods exist precisely so adapters can pass streams through to the underlying SDK. Ask the maintainer or inspect the code to confirm reads and writes are streamed end to end rather than buffered.
- Can I use Huawei Cloud OBS as a drop-in replacement for Amazon S3 in Laravel?
- Not reliably with Laravel's built-in s3 driver. OBS has an S3-compatible subset, but aws-sdk-php often fails against it on request signing nuances, x-amz-* header translation, path-style versus virtual-hosted addressing, and temporaryUrl() generation. A dedicated Flysystem adapter wrapping Huawei's official obs/esdk-obs-php SDK is the architecturally correct approach, because your application code keeps using Storage::disk() unchanged.
- How does the package handle multipart uploads for files over 100 MB?
- Multipart upload is what prevents timeouts and memory exhaustion on large objects, and it is a common gap in thin Flysystem adapters. The package should chunk uploads above a configurable threshold using the OBS SDK, but you should verify whether that logic exists or whether the adapter performs a single PUT. If multipart is missing, plan to upload large files directly with the Huawei SDK.
- Does the driver support STS temporary credentials and custom credential providers?
- Long-lived hard-coded AK/SK pairs are a compliance finding in most organizations, so support for STS or rotating credentials matters. Whether this package accepts a custom credential provider depends on how it constructs the obs/esdk-obs-php client internally; check whether the client is configurable or hard-coded in the service provider. If not, a small fork or wrapper around the SDK may be needed.
- How are OBS SDK errors mapped to Laravel's UnableToReadFile and UnableToWriteFile exceptions?
- Laravel's Storage facade expects failures to surface as Flysystem exceptions such as UnableToReadFile, UnableToWriteFile, and UnableToCheckExistence. If the adapter lets raw OBS SDK exceptions bubble up, guards like Storage::exists() or @if checks can break or leak confusing stack traces. Audit the adapter's try/catch translation before depending on it in production.
- Is dscmall/laravel-filesystem-obs actively maintained and what license does it use?
- It is a single-maintainer package with low star counts and no visible governance, so bus factor is a real risk. Check the repository's commit history, open issues, and license file before adopting it; a permissive license means you can vendor the code if needed. Because the codebase is small, owning a fork is a realistic fallback.
- How do I test the OBS disk in Laravel without hitting Huawei Cloud on every run?
- Use Storage::fake() for code paths that only need the Storage contract, and keep the OBS disk behind a small internal interface so tests can swap in an in-memory implementation. For integration tests, point the driver at a dedicated test bucket with scoped credentials and skip those tests when OBS credentials are absent in CI. Avoid asserting on presigned URLs without freezing time, since signatures are time-sensitive.