Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom private storages with nginx #75

Open
BlueberryCat0 opened this issue Apr 8, 2022 · 0 comments
Open

Custom private storages with nginx #75

BlueberryCat0 opened this issue Apr 8, 2022 · 0 comments

Comments

@BlueberryCat0
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant