app: use "lookup_component" instead of "lookup_plugin"
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
ed217fb3e9
commit
ce78e42065
|
@ -380,7 +380,7 @@ class FileRequestHandler(AuthorizedFileHandler):
|
||||||
async def delete(self, path):
|
async def delete(self, path):
|
||||||
path = self.request.path.lstrip("/").split("/", 2)[-1]
|
path = self.request.path.lstrip("/").split("/", 2)[-1]
|
||||||
path = url_unescape(path, plus=False)
|
path = url_unescape(path, plus=False)
|
||||||
file_manager = self.server.lookup_plugin('file_manager')
|
file_manager = self.server.lookup_component('file_manager')
|
||||||
try:
|
try:
|
||||||
filename = await file_manager.delete_file(path)
|
filename = await file_manager.delete_file(path)
|
||||||
except self.server.error as e:
|
except self.server.error as e:
|
||||||
|
@ -395,7 +395,7 @@ class FileRequestHandler(AuthorizedFileHandler):
|
||||||
class FileUploadHandler(AuthorizedRequestHandler):
|
class FileUploadHandler(AuthorizedRequestHandler):
|
||||||
def initialize(self, max_upload_size):
|
def initialize(self, max_upload_size):
|
||||||
super(FileUploadHandler, self).initialize()
|
super(FileUploadHandler, self).initialize()
|
||||||
self.file_manager = self.server.lookup_plugin('file_manager')
|
self.file_manager = self.server.lookup_component('file_manager')
|
||||||
self.max_upload_size = max_upload_size
|
self.max_upload_size = max_upload_size
|
||||||
|
|
||||||
def prepare(self):
|
def prepare(self):
|
||||||
|
|
Loading…
Reference in New Issue