#34674: Updating the file contents of a Django FileField during upload results 
in
I/O error
-------------------------------------+-------------------------------------
     Reporter:  Jeroen Jacobs        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  File                 |                  Version:  4.2
  uploads/storage                    |
     Severity:  Normal               |               Resolution:
     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 Jeroen Jacobs):

 * status:  closed => new
 * resolution:  invalid =>


Comment:

 I am reopening this ticket, as is this is clearly a bug and not a support
 request.

 The error is not in my custom code! The error occurs when writing to a
 Django FileField which is opened for writing. This not custom code, I'm
 calling core Django code here.

 Please take a good look at the code:

 {{{
         with self.app_file.open(mode='wb') as encrypted_file:
             encrypted_file.write(encrypted_data)
 }}}

 app_file is a `FileField` and FileField is pure Django class, not custom
 code!

 Please read the description again: I'm writing to a Django FileField which
 was successfully opened, and I'm getting an error that the file is closed!
 This is clearly a bug! Did you even try to reproduce it using my example
 code?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34674#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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070188e9cbb57b-e0500a12-09b2-423c-9cec-6a87cfa6d064-000000%40eu-central-1.amazonses.com.

Reply via email to