Changes between Initial Version and Version 1 of Ticket #32329, comment 4


Ignore:
Timestamp:
Jan 16, 2021, 8:03:24 PM (4 years ago)
Author:
Tim McCurrach

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32329, comment 4

    initial v1  
    3939
    4040If we did add such a check, could we ignore handling `OSError`s in `TemporaryUploadedFile.__init__`? My immediate feeling is that even if a check would mitigate this particular error, there are probably other errors that could occur here, and letting them bubble up to wherever they happen to get caught is confusing and difficult to debug. As such, a decision is needed as to how they should be handled.
     41
     42I suppose another solution would be to create some sort of `FailedUploadedFile` that subclasses `UploadedFile` that could be added to `request._files` and then the error could be handled by the view/form and an appropriate error could be returned.
Back to Top