NAME
Plack::App::Storage::Abstract - Serve files with Storage::Abstract
SYNOPSIS
use Plack::App::Storage::Abstract;
my $app1 = Plack::App::Storage::Abstract->new(
storage_config => {
driver => 'directory',
directory => '/some/dir',
},
)->to_app;
DESCRIPTION
This plack application serves files through Storage::Abstract. It is similar to Plack::App::File, but gives better control over file storage.
CONFIGURATION
storage
The constructed Storage::Abstract
object. If not present, will be constructed from "storage_config".
storage_config
A hash reference with keys to be passed to "new" in Storage::Abstract. Required, but may be skipped if "storage" is passed instead.
encoding
Encoding used for text MIME types. Default utf-8
.
CAVEATS
Handling errors
On error producing a 500
page, stringified exception will be written to PSGI error stream.
SEE ALSO
AUTHOR
Bartosz Jarzyna <bbrtj.pro@gmail.com>
COPYRIGHT AND LICENSE
Copyright (C) 2024 by Bartosz Jarzyna
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.