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


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32329, comment 4

    v1 v2  
    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.
    4141
    42 I 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.
     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 a decision can be made at that point how it should be handled.
Back to Top