- What is EscolaLMS Files used for?
- EscolaLMS Files is a Laravel package for managing files attached to Eloquent models in the EscolaLMS platform. It provides upload handling, configurable storage disks, polymorphic file-to-model relationships, and REST-friendly retrieval for LMS entities such as courses. It is intended as a shared file layer that other EscolaLMS packages can depend on.
- How do I install EscolaLMS Files with Composer?
- Install it as a Composer dependency using the package name escolalms/files, then register the service provider according to Laravel package conventions. Publish the configuration and migrations, run the migrations, and configure the storage disk you want to use. Because the package is pre-1.0, pin a specific version such as 0.1.29 and test in a non-production branch first.
- Does EscolaLMS Files support polymorphic file attachments?
- Yes. The package is designed to associate files with any Eloquent model through polymorphic attachments. That lets LMS entities such as courses or other platform models share one consistent file layer. You should still review the package migrations and model traits or relationships before integrating it with existing models.
- Which Laravel and PHP versions does EscolaLMS Files support?
- The provided materials do not list exact Laravel and PHP version constraints, so check the package composer.json and release notes before installing. Confirm required PHP extensions, especially if you plan to enable XLSX or ZIP support. Because it is a 0.1.x package, verify compatibility in a sandbox with your application's Laravel version.
- How do I configure local or S3 storage in EscolaLMS Files?
- The package uses configurable Laravel storage disks, so you can point it at local storage, S3, or a custom disk. Publish the package configuration, set the desired disk and path options, and ensure your Laravel filesystem credentials and permissions are correct. Test uploads and downloads in staging before enabling the configuration for users.
- Does EscolaLMS Files support XLSX and ZIP uploads?
- Version 0.1.29 adds XLSX and ZIP support, extending the package's existing file-type handling. The release note alone does not confirm whether this means storage and transport only or also parsing, preview, extraction, or validation. Review the package config, validation rules, and tests before enabling these types.
- Is EscolaLMS Files safe for ZIP and XLSX uploads in production?
- Accepting ZIP and XLSX files increases the attack surface through risks such as ZIP bombs, archive traversal, MIME spoofing, malicious macros, formula injection, and storage exhaustion. The package can handle file storage, but host applications should add type and size limits, compression-ratio controls, antivirus or content-disarm scanning, quotas, and quarantine workflows. Treat XLSX and ZIP support as opt-in and canary it before broad enablement.
- How should I test file uploads and downloads with EscolaLMS Files?
- Start by running the package's own tests in a sandbox and inspecting how it validates MIME types, extensions, and size limits. In your Laravel application, use feature tests with fake storage disks to cover successful uploads, rejected files, downloads, and model attachment behavior. Add regression tests for existing file types before enabling XLSX or ZIP, and repeat the checks in staging with real storage drivers.
- Can I use EscolaLMS Files outside the EscolaLMS platform?
- EscolaLMS Files is Laravel-native, but it is designed for the EscolaLMS ecosystem and may assume platform conventions, policies, or related packages. You can evaluate it in a standalone Laravel application, but check its dependencies, service provider, migrations, and authorization expectations first. For a non-EscolaLMS project, a more general Laravel file or media package may be a better fit.
- What are alternatives to EscolaLMS Files for Laravel file management?
- Common alternatives include Spatie Laravel Media Library, Laravel's native filesystem and storage APIs, and custom upload services built around Eloquent polymorphic relationships. EscolaLMS Files is most relevant when you already use the EscolaLMS platform and want a shared, tested file layer for its entities. Compare packages on polymorphic attachments, storage-disk support, validation, security controls, and maintenance activity.