Using custom PrivateFileSystemStorage with a complex kwarg location arises “problem” doesn’t read nested subfolders within the folder containing private files.
# Storage
DOCUMENT_SECOND_STORAGE: ty.Final[PrivateFileSystemStorage] = PrivateFileSystemStorage(
location=f'{settings.PRIVATE_STORAGE_ROOT}/docs_second',
base_url='/storage/docs_second/',
)
# View url
urlpatterns = (
re_path('^docs-second/(?P<path>.*)', DocumentSecondStorageView.as_view()),
)
As for url http://localhost/storage/docs-second/1_TPgao9l4.jpeg within the folder however won’t go into subfolders to look for the file.
How do I get it fixed correctly?
Using custom
PrivateFileSystemStoragewith a complex kwarg location arises “problem” doesn’t read nested subfolders within the folder containing private files.As for url
http://localhost/storage/docs-second/1_TPgao9l4.jpegwithin the folder however won’t go into subfolders to look for the file.How do I get it fixed correctly?