def register_storage(self): storage = StorageCapsule() storage.add_storage_assets(STATICFILES) self.application.bind("storage_capsule", storage) self.application.set_response_handler(response_handler) self.application.use_storage_path(base_path("storage"))
def register_storage(self): storage = StorageCapsule() storage.add_storage_assets({ # folder # template alias "tests/integrations/storage/static": "static/", "tests/integrations/storage/compiled": "static/", "tests/integrations/storage/uploads": "static/", "tests/integrations/storage/public": "/", }) self.application.bind("storage_capsule", storage) self.application.set_response_handler(response_handler) self.application.use_storage_path(base_path("storage"))
from masonite.environment import env from masonite.utils.location import base_path DISKS = { "default": "local", "local": { "driver": "file", "path": base_path("storage/framework/filesystem") }, "s3": { "driver": "s3", "client": env("AWS_CLIENT"), "secret": env("AWS_SECRET"), "bucket": env("AWS_BUCKET"), }, } STATICFILES = { # folder # template alias 'storage/static': 'static/', 'storage/static/css': 'css/', 'storage/compiled/css': 'assets/', 'storage/compiled/js': 'js/', 'storage/public': '/', }
from masonite.foundation import Application, Kernel from masonite.utils.location import base_path from masonite.configuration import config from Kernel import Kernel as ApplicationKernel """Start The Application Instance.""" application = Application(base_path()) """Now Bind important providers needed to make the framework work.""" application.register_providers(Kernel, ApplicationKernel) """Now Bind important application specific providers needed to make the application work.""" application.add_providers(*config("providers.providers"))
from masonite.environment import env from masonite.utils.location import base_path DISKS = { "default": "local", "local": {"driver": "file", "path": base_path("storage/framework/filesystem")}, "s3": { "driver": "s3", "client": env("AWS_CLIENT"), "secret": env("AWS_SECRET"), "bucket": env("AWS_BUCKET"), }, } STATICFILES = { # folder # template alias "storage/static": "static/", "storage/static/css": "css/", "storage/compiled/css": "assets/", "storage/compiled/js": "js/", "storage/public": "/", }