#35619: django.core.files.uploadfile.InMemoryUploadedFile ignores chunk_size
-------------------------------------+-------------------------------------
     Reporter:  XU GUI PING          |                    Owner:  (none)
         Type:  Bug                  |                   Status:  closed
    Component:  File                 |                  Version:  5.0
  uploads/storage                    |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

 * resolution:   => invalid
 * severity:  Release blocker => Normal
 * status:  new => closed
 * summary:  django.core.files.uploadfile.InMemoryUploadedFile has a serious
     bug => django.core.files.uploadfile.InMemoryUploadedFile ignores
     chunk_size

Comment:

 Hi, I believe what you're trying to report is that `chunk_size` is ignored
 in `InMemoryUploadedFile.chunks(chunk_size=None)`.
 From what I can see, this is by design and this is clarified in a comment
 within `multiple_chunks`:
 {{{#!python
     def multiple_chunks(self, chunk_size=None):
         # Since it's in memory, we'll never have multiple chunks.
         return False
 }}}

 Essentially, there is no real benefit of chunking an in memory file

 I appreciate that this
 
[https://docs.djangoproject.com/en/5.0/ref/files/uploads/#django.core.files.uploadedfile.InMemoryUploadedFile
 isn't explicitly documented] and maybe we could add a clarifying note to
 the docs.

 But I don't believe this is a bug
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35619#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070190cae2f06e-2ec9b1e5-827a-4700-9a4e-116559d3556c-000000%40eu-central-1.amazonses.com.

Reply via email to