generate blob url for file field

Side note: This question is one of those where I’m glad to be reading this forum. I had never even heard of blobs in the context of a web protocol until now. (For those with the same lack of knowledge, see File API)

In a production environment, your static and media files should be served by your web server and not Django.

So what web server is your target environment? That’s the configuration issue I’d be looking to address. For example, if you’re running your app under Nginx, I’d be looking for a way to configure Nginx to serve blobs.

(Having said that, a cursory review of the nginx docs doesn’t give me any specific clues in that direction. You might try something along the lines of using default_type and/or sendfile.)

1 Like