Skip to content

Serve media files from Postgres instead of Nginx #4642

Answered by luzfcb
yaksheng asked this question in Q&A
Discussion options

You must be logged in to vote

I have never actually used PostgreSQL as a file server, and from my current understanding, I think it was not designed for that and there are probably better alternatives.

If you need to server private files from infrastructure that you maintain yourself (i.e. you are not using Amazon S3 and similar) and limit their access to authenticated users and apply any rules you want, you can use django-downloadview + Nginx X-Accel https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/

https://github.com/jazzband/django-downloadview

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@yaksheng
Comment options

Comment options

You must be logged in to vote
1 reply
@yaksheng
Comment options

Answer selected by luzfcb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants