-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Allow passing django file objects to sendfile #50
Comments
That would only work if |
I was not thinking about mime-type guessing, since that is not stored nor accessible via django file API. I was thinking about a more user-friendly approach by using: sendfile(mymodel.file_field)
sendfile(myfile) In place of the current: sendfile(mymodel.file_field.path)
sendfile(myfile.name) Obviously to work with |
I'm liking this idea less and less. Users are going to be confused and frustrated if we tell them we support Thanks for submitting this issue, but I don't think we'll be implementing this. |
It would be great if
sendfile
could supportdjango.core.files.File
anddjango.db.models.fields.FileField
as an argument in place offilename
.This could improve usability, since many files are stored as filefield.
The text was updated successfully, but these errors were encountered: