django-sendfile2 icon indicating copy to clipboard operation
django-sendfile2 copied to clipboard

Allow bypassing of mimetype and encoding guessing

Open moggers87 opened this issue 4 years ago • 0 comments

Following on from #18

sendfile() currently checks if the requested file exists regardless of chosen backend. However, most backends actually support serving files that are not necessarily accessibly to the Django app.

  • File exists checks should only happen when data for headers is not available (implying the user wants us to do it for them)
  • Add a kwarg for content length
  • Simple and development backends assume that the file exists if they are called, either make those backends aware or wrap the backend call in an appropriate try/except

moggers87 avatar Feb 11 '20 01:02 moggers87