From b9482635196186fce6235bc00e0c6c97943310ea Mon Sep 17 00:00:00 2001 From: lan Date: Tue, 13 Dec 2022 21:16:41 +0800 Subject: [PATCH] fix:upload failure --- storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage.py b/storage.py index 0059aed..8caf08d 100644 --- a/storage.py +++ b/storage.py @@ -23,7 +23,7 @@ class FileSystemStorage: path = self.DATA_ROOT / f"upload/{now.year}/{now.month}/{now.day}/" if not path.exists(): path.mkdir(parents=True) - text = f"{self.STATIC_URL}/{(path / f'{key}.{ext}').relative_to(self.DATA_ROOT).relative_to(self.DATA_ROOT)}" + text = f"{self.STATIC_URL}/{(path / f'{key}.{ext}').relative_to(self.DATA_ROOT)}" return text @staticmethod