ProtectedbuildBuild full path with disk root and path template substitution
Relative path within the disk
Name of the disk
Full path including disk root
Chunked upload (same as regular upload for fake)
Optionaldisk: stringClear all stored files (call in beforeEach for test isolation)
Delete a file from fake storage
Check if a file exists in fake storage
Get all available disk names
Array of disk names
Generate a fake presigned delete URL
OptionalexpiresIn: numberGenerate a fake presigned download URL
OptionalexpiresIn: numberGenerate a fake presigned upload URL
OptionalexpiresIn: numberProtectedgetGenerate a presigned URL for any method
Relative path within the disk
HTTP method (GET, PUT, DELETE, HEAD)
OptionalexpiresIn: numberOptional expiry time in seconds (uses default if not provided)
Optionaldisk: stringOptional disk name (uses default if not provided)
Presigned URL result
Get all stored files (for inspection)
Get all stored file paths
ProtectedresolveResolve disk name (use default if not provided)
Optionaldisk: stringOptional disk name
Resolved disk name
ProtectedsubstituteSubstitute template variables in path Override this method in subclasses to add custom substitutions
Path with template variables
Path with substituted variables
Upload content to fake storage
Optionaldisk: stringProtectedvalidateValidate expiry time for presigned URLs
OptionalexpiresIn: numberOptional expiry time in seconds
Validated expiry time
FakeStorageService
In-memory storage implementation for testing. Registered by default in TestingModuleBuilder.
Similar to Laravel's Storage::fake() - stores files in memory and provides assertion helpers for testing.
Example