- How do I install unisharp/laravel-fileapi in a Laravel application?
- Install it with Composer, publish the package configuration, and register the storage disk you want uploads to use. Then add the package routes and any middleware your app requires, and verify the upload endpoint against Laravel's validation rules. Pin the package version in composer.json before rolling it out.
- Which Laravel and PHP versions does laravel-fileapi support?
- The provided documentation does not list a complete Laravel and PHP support matrix, so confirm compatibility from the package's composer.json and CI configuration before adopting it. This is a v1.0.x line, so test against your exact Laravel and PHP versions rather than assuming broad coverage. Check that the cloud SDK and image driver versions also align with your dependency graph.
- How do I configure local, S3, or Google Cloud Storage disks with laravel-fileapi?
- Storage is handled through Laravel's filesystem disks, so you configure the target disk in config/filesystems.php and point the package at it. Local and S3 usage follow the usual Laravel disk setup, and Google Cloud Storage support was added in v1.0.2. Keep disk credentials and visibility settings per environment.
- Can laravel-fileapi upload images without generating thumbnails?
- Yes. The v1.0.2 release adds an opt-in behavior that allows uploading images without thumbnails, which decouples file ingestion from derivative generation. This is useful for high-volume upload paths where thumbnail creation can be deferred or treated as best-effort. It is a configuration-level change, not an API rewrite.
- How does laravel-fileapi validate uploaded files?
- Uploads are validated through Laravel's request validation system, so you define the usual rules for file size, MIME type, and image dimensions. The package fits into Laravel's validation flow rather than introducing a separate validation layer. Keep validation rules in your application code so they can be tested and versioned with your endpoints.
- Does laravel-fileapi generate thumbnails in a queue?
- The available information describes both queued and synchronous upload pipelines but does not document a guaranteed queue behavior for thumbnail generation. Test how the package behaves on partial failure, such as when the original is stored but the derivative is missing. If thumbnail work must be deferred, wrap or dispatch it through your own Laravel queue job.
- What are the risks of using the empty suffix option in laravel-fileapi?
- Allowing an empty suffix can create filename collisions when generated object keys are not unique. Mitigate this at the application layer with unique IDs, hashes, or path prefixes before enabling the option. Treat collision avoidance as your responsibility and add tests around the generated file paths.
- Which image drivers does laravel-fileapi require, GD or Imagick?
- The package requires an image driver, either GD or Imagick, in the deployment environment. The provided material does not document specific memory limits for large source images, so set and test PHP memory limits for your expected upload sizes. Confirm the chosen driver is installed in your container or server image.
- How are thumbnail visibility and signed URLs handled on S3 or GCS?
- Thumbnail visibility on third-party storages was corrected in v1.0.2, which suggests ACL and permissions behavior is configured through the disk or upload settings. Review the visibility model carefully because incorrect settings can expose files rather than just break display. Signed URL generation should go through Laravel's filesystem disk abstraction, and you should test it against your actual S3 or GCS configuration.
- Is unisharp/laravel-fileapi production-ready, and which version should I pin?
- Treat it as a v1.0.x dependency and pin an exact version rather than using a floating constraint. The changelog is bug-fix-heavy, including fixes for GIF frame loss, JPG quality, and thumbnail visibility, so older versions carried data-integrity and access-control risk. Run a regression suite over image fidelity, file paths, and disk permissions before production use.