django-sendfile2 | Friendly fork | REST library
kandi X-RAY | django-sendfile2 Summary
kandi X-RAY | django-sendfile2 Summary
xsendfile etc wrapper for Django. Friendly fork of django-sendfile
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Return a dict containing the cmdclass
- Construct a ConfigParser from a root
- Get the project root directory
- Extract version information from the current working directory
- Create the versioneer config file
- Install versioneer
- Run git commands
- Show download
- Allow user to access the file
- Extract version information from VCS
- Scans the setup py file
django-sendfile2 Key Features
django-sendfile2 Examples and Code Snippets
Community Discussions
Trending Discussions on django-sendfile2
QUESTION
in a wagtail project, I need all image and document file URLs to be "private", e.g. to respect the "privacy setting" of the collection that file/instance belongs to. Further, these URLs must be private even if the URL is known/guessable.
For wagtail documents, I've found:
https://docs.wagtail.io/en/stable/reference/settings.html?highlight=sendfile#documents
which works.
I've expected a similar setup/reference for wagtail images, but got:
https://docs.wagtail.io/en/stable/advanced_topics/images/image_serve_view.html#advanced-configuration
I did not manage to successfully implement this image_serve_view-sendfile-configuration.
Anyone knows a way to serve wagtail images the same way as wagtail documents (via the simple setting WAGTAILDOCS_SERVE_METHOD
?
I'm OK with the StreamingResponse in case django-sendfile
is not installed. I just want my wagtail documents AND images to respect the privacy level defined via the collections privacy setting (e.g. "Private, only accessible for logged-in users").
But even with a more elegant and performant solution via django-sendfile (or a more up-to-date and maintained fork like django-sendfile2) I'm missing documentation which details the steps to implement this setup for wagtail documents and wagtail images.
...ANSWER
Answered 2021-Jun-02 at 07:50Enforcing privacy for images is not as simple as documents for the reasons described in this issue:
https://github.com/wagtail/wagtail/issues/3880#issuecomment-332798643
That issue has been referenced more recently, so i believe is still the case. It is marked as 'someday' (valid but lower priority).
This is not a full answer, but hopefully helps articulate the problem.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install django-sendfile2
You can use django-sendfile2 like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page