In-memory storage adapter for testing.
Files are stored in an Agent process and are lost when the process stops.
Configuration
config :phx_media_library,
disks: [
memory: [
adapter: PhxMediaLibrary.Storage.Memory,
base_url: "/test-uploads"
]
]Usage in Tests
setup do
PhxMediaLibrary.Storage.Memory.clear()
:ok
end
Summary
Functions
Get all stored files. Useful for debugging.
Returns a specification to start this module under a supervisor.
Clear all stored files. Useful in test setup.
Functions
Get all stored files. Useful for debugging.
Returns a specification to start this module under a supervisor.
See Supervisor.
Clear all stored files. Useful in test setup.