mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #22680 -- I/O operation on closed file.
This patch is two-fold; first it ensure that Django does close everything in request.FILES at the end of the request and secondly the storage system should no longer close any files during save, it's up to the caller to handle that -- or let Django close the files at the end of the request.
This commit is contained in:
		| @@ -96,9 +96,6 @@ class InMemoryUploadedFile(UploadedFile): | ||||
|     def open(self, mode=None): | ||||
|         self.file.seek(0) | ||||
|  | ||||
|     def close(self): | ||||
|         pass | ||||
|  | ||||
|     def chunks(self, chunk_size=None): | ||||
|         self.file.seek(0) | ||||
|         yield self.read() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user